Field level permissions for Django REST Framework
Project description
New permissions possibilities for rest-framework
Compatibility
Works with :
Python 2.7, 3.3, 3.4
Django >= 1.7
Django Rest Framework >= 3.0
Installation
Install the package from pypi:
pip install djangorestframework-fine-permissions
Add the application in your django settings:
DJANGO_APPS = ('rest_framework_fine_permissions',)
Sync the django’s database:
python manage.py syncdb
Configure your rest framework :
REST_FRAMEWORK = { 'DEFAULT_FILTER_BACKENDS': ( # Enable the filter permission backend for all GenericAPIView 'rest_framework_fine_permissions.filters.FilterPermissionBackend', ), 'DEFAULT_PERMISSION_CLASSES': ( # Enable the django model permissions (view,create,delete,modify) 'rest_framework_fine_permissions.permissions.FullDjangoModelPermissions', # OPTIONAL if you use FilterPermissionBackend and GenericAPIView. Check filter permissions for objects. 'rest_framework_fine_permissions.permissions.FilterPermission', ) }
Usage
Go to the django admin page
Add field’s permissions to a user with the “User fields permissions” link
Add filter’s permissions to a user with the “User filters permissions” link
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for djangorestframework-fine-permissions-0.6.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc16349d6ddb95c58eb15940c2bd7550847078b19eb0ff9b6d8ba5fc358e52f6 |
|
MD5 | 98299f386165282f0eae6016170b1537 |
|
BLAKE2b-256 | 78978549f36f7df07368bed16b7f266da3b7b0c9d922f7f3a39e66a24b956882 |