django-permissionedforms
Django extension for creating forms that vary according to user permissions
What it is and what it does
django-permissionedforms is a lightweight Django forms extension that lets you declaratively control which fields appear in a form based on the logged-in user's permissions. Instead of manually filtering fields in view code, you define a `field_permissions` dict in the form's Meta class, mapping field names to Django permission codenames. When you instantiate the form with `for_user=request.user`, fields the user lacks permission for are automatically omitted from the form.
The package provides two base classes: `PermissionedForm` for regular forms and `PermissionedModelForm` for model forms. It also exposes a metaclass and mixin for integrating permission handling into other custom form base classes. The permission check uses Django's standard `user.has_perm()` method, so it respects superuser status and custom permission backends. However, the package has been abandoned since its first release on 2022-02-28 and receives no maintenance or updates.
Use it for:
- Build admin or data-entry forms where certain fields (e.g., salary, status) are only visible to users with specific permissions.
- Create multi-role forms where editors see different fields than reviewers, without duplicating form logic in views.
- Restrict sensitive fields in ModelForms to superusers or staff by using arbitrary codenames like 'superuser'.
- Integrate permission-based field visibility into Wagtail or other Django-based CMS forms using multiple inheritance.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Extends Django's forms framework to conditionally show or hide form fields based on the user's permissions, using a declarative Meta class configuration.
No. The package is abandoned with no maintenance signal since 2022-02-28. While the core idea is sound and install friction is low, using unmaintained code in a production Django application introduces technical debt and risk. For new projects, implement permission-based field filtering directly in your form logic; for existing projects, consider migrating away.
Install
django-permissionedforms on PyPI
pip
pip install django-permissionedformsuv
uv add django-permissionedformspoetry
poetry add django-permissionedformsInstalling django-permissionedforms
Before you install
Low install friction with a single Django dependency. However, the package is abandoned—last release was 2022-02-28 and last commit 2022-03-16. No active maintenance or security updates.
License in practice
BSD license is permissive and poses no restrictions on use, modification, or distribution in most contexts.
Quickstart
pip install django-permissionedforms
from permissionedforms import PermissionedForm
from django import forms
class PersonForm(PermissionedForm):
first_name = forms.CharField()
last_name = forms.CharField()
class Meta:
field_permissions = {'last_name': 'myapp.change_last_name'}
form = PersonForm(for_user=request.user)
Requires Django as a runtime dependency; form fields will only be conditionally hidden if the for_user parameter is passed at instantiation.
Verify before relying
- Whether the package works with current Django versions given no updates since 2022-03-16
- Whether permission checks integrate correctly with custom user models or third-party auth backends
- Real-world adoption and whether the 873239 monthly downloads reflect active use or legacy installations
Package facts
| License | BSD (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — Django |
| Maintenance | abandoned — 1,628 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 873,239/month — #4,838 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_permissionedforms-0.1-py2.py3-none-any.whl
Tags
More Dynamic Content packages
MarkupSafe provides a text object that escapes…
permissive · top 100 on PyPI
Jinja2Jinja2 is a templating engine that renders…
permissive · top 100 on PyPI
soupsieveSoupsieve is a CSS selector library designed to…
permissive · top 100 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
FlaskFlask is a lightweight WSGI web application…
permissive · top 1,000 on PyPI
MakoMako compiles Python-embedded templates into…
permissive · top 1,000 on PyPI
dry-rest-permissionsDefines rules-based permissions for Django REST…
permissive · top 15,000 on PyPI
drf-access-policyDeclares access control rules for Django REST…
permissive · top 15,000 on PyPI
django-aceIntegrates the ACE code editor into Django…
permissive · top 15,000 on PyPI
djangorestframework-guardianIntegrates django-guardian's object-level…
permissive · top 15,000 on PyPI
rest_conditionProvides logical operators (And, Or, Not) to…
permissive · top 15,000 on PyPI
django-ckeditor-5Integrates CKEditor 5, a modern rich-text…
permissive · top 15,000 on PyPI
django-bootstrap-datepicker-plusProvides Bootstrap-styled date, time, and…
permissive · top 15,000 on PyPI
django-enumfieldsProvides Django model fields that store Python…
permissive · top 15,000 on PyPI
django-impersonateAllows Django superusers to temporarily assume…
permissive · top 15,000 on PyPI
zope.securityProvides a generic security framework for…
unclear · top 15,000 on PyPI