skillfed

django-permissionedforms

Django extension for creating forms that vary according to user permissions

django-permissionedforms v0.1 873.2K downloads/30d#4,838 on PyPI14
Permissive license BSD Abandoned released

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-permissionedforms

uv

uv add django-permissionedforms

poetry

poetry add django-permissionedforms

Installing 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

Development Status :: 4 - BetaEnvironment :: Web EnvironmentFramework :: DjangoIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

django permission-based form fieldsconditional form fields by user permissionsdjango forms with access controlpermission-aware django formsshow hide form fields permissions
django-formspermission-control

More Dynamic Content packages

MarkupSafe

MarkupSafe provides a text object that escapes…

permissive · top 100 on PyPI

Jinja2

Jinja2 is a templating engine that renders…

permissive · top 100 on PyPI

soupsieve

Soupsieve is a CSS selector library designed to…

permissive · top 100 on PyPI

Werkzeug

Werkzeug is a WSGI utility library providing…

permissive · top 1,000 on PyPI

Flask

Flask is a lightweight WSGI web application…

permissive · top 1,000 on PyPI

Mako

Mako compiles Python-embedded templates into…

permissive · top 1,000 on PyPI

dry-rest-permissions

Defines rules-based permissions for Django REST…

permissive · top 15,000 on PyPI

drf-access-policy

Declares access control rules for Django REST…

permissive · top 15,000 on PyPI

django-ace

Integrates the ACE code editor into Django…

permissive · top 15,000 on PyPI

djangorestframework-guardian

Integrates django-guardian's object-level…

permissive · top 15,000 on PyPI

rest_condition

Provides logical operators (And, Or, Not) to…

permissive · top 15,000 on PyPI

django-ckeditor-5

Integrates CKEditor 5, a modern rich-text…

permissive · top 15,000 on PyPI

django-bootstrap-datepicker-plus

Provides Bootstrap-styled date, time, and…

permissive · top 15,000 on PyPI

django-enumfields

Provides Django model fields that store Python…

permissive · top 15,000 on PyPI

django-impersonate

Allows Django superusers to temporarily assume…

permissive · top 15,000 on PyPI

zope.security

Provides a generic security framework for…

unclear · top 15,000 on PyPI