A simple Django app which adds view permissions.
Project description
Reusable application which provides a view permission for the existing models.
Requirements
Django
Support
Django: 1.8, 1.9, 1.10
Python: 2.7, 3.4, 3.5
Documentation
For a full documentation you can visit: http://django-admin-view-permission.readthedocs.org/
Setup
pip install django-admin-view-permission
and then add admin_view_permission at the INSTALLED_APPS like this:
INSTALLED_APPS = [ 'admin_view_permission', 'django.contrib.admin', ... ]
and finally run python manage.py migrate.
Configuration
This app provides a setting:
ADMIN_VIEW_PERMISSION_MODELS = [ auth.User, ... ]
in which you can provide which models you want to be added the view permission. If you don’t specify this setting then the view permission will be applied to all the models.
Uninstall
Remove the admin_view_permission from your INSTALLED_APPS setting
Delete the view permissions from the database:
from django.contrib.auth.models import Permission permissions = Permission.objects.filter(codename__startswith='view') permissions.delete()
It will be helpful to check if the queryset contains only the view permissions and not anything else (for example: custom permission added)
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
Hashes for django-admin-view-permission-0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92fbc2c6f4e488093e4c20d1b1fdb3070ba75ed2ebdda03a25e2e7635c5284a2 |
|
MD5 | f15f8d9c0937abf7c67ee6755a0dc82e |
|
BLAKE2b-256 | 946ba22ad57d5531bfb28a4ccebefb92f183ee8e2c85dcb636927addaba596a0 |