{"categories":[{"label":"Dynamic Content","url":"https://skillfed.io/packages/category/internet-www-http-dynamic-content"}],"enrichment":{"capability":"Extends Django's forms framework to conditionally show or hide form fields based on the user's permissions, using a declarative Meta class configuration.","skillfed_tags":["django-forms","permission-control"],"use_cases":["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."],"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.\n\nThe 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.","worth_installing":"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."},"id":"django-permissionedforms","links":{"html":"https://skillfed.io/packages/django-permissionedforms","md":"https://skillfed.io/packages/django-permissionedforms.md","pypi":"https://pypi.org/project/django-permissionedforms/"},"maintenance":{"status":"abandoned"},"meta":{"latest_release":"2022-02-28","license_spdx":null,"license_treatment":"permissive","name":"django-permissionedforms","python_support":"supports_current","summary":"Django extension for creating forms that vary according to user permissions"},"popularity":{"monthly_downloads":873239,"position":4838,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.1"}
