--- id: django-permissionedforms version: "0.1" license: BSD license_treatment: permissive maintenance: abandoned --- # django-permissionedforms — Django extension for creating forms that vary according to user permissions License: permissive · Maintenance: abandoned · Downloads: 873.2K/mo ## 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 above — 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 pip install django-permissionedforms uv add django-permissionedforms 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_current - Install friction: low - Maintenance: abandoned - Downloads: 873.2K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags django permission-based form fields, conditional form fields by user permissions, django forms with access control, permission-aware django forms, show hide form fields permissions, django-forms, permission-control [View on SkillFed](https://skillfed.io/packages/django-permissionedforms) · [View on PyPI](https://pypi.org/project/django-permissionedforms/)