A simple Django app which adds view permissions.
Reusable application which provides a view permission for the existing models.
For a full documentation you can visit: http://django-admin-view-permission.readthedocs.org/
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.
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.
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)