Skip to main content
Build Status Coverage Status Code Climate

Reusable application which provides a view permission for the existing models.

Requirements

  • Django

Support

The package is deprecated for Django 2.1. Django added the functionality into the core ( the 2 implementations are different). You should use this package only if you use Django < 2.1.

  • If you have installed this package by accident to your Django 2.1 project, it won’t affect the build-in view permission which comes with Django.

  • If you have upgraded you application to use Django > 2.1 just uninstall this package

  • Django: 1.8, 1.9, 1.10, 1.11, 2.0

  • Python: 2.7, 3.4, 3.5, 3.6

Compatible with django-parler’s translatable models. To verify which django-parler version our test suite runs against, check requirements-debug.txt. You do not need django-parler to install django-admin-view-permission.

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.

You need to place the admin_view_permission before django.contrib.admin in INSTALLED_APPS.

In case of a customized AdminSite in order to apply the view permission, you should inherit from the AdminViewPermissionAdminSite class:

from admin_view_permission.admin import AdminViewPermissionAdminSite

class MyAdminSite(AdminViewPermissionAdminSite):
    ...

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

  1. Remove the admin_view_permission from your INSTALLED_APPS setting

  2. 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)

Release files for django-admin-view-permission 1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-admin-view-permission 1.9
File Size Uploaded
django-admin-view-permission-1.9.tar.gz 9.6 kB Details

Release files / django-admin-view-permission-1.9.tar.gz

Download URL django-admin-view-permission-1.9.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
880c63de9ecb5f7be9ca8f3690ac4f366f07535eefe41d69ffa2ff2647e1b678
BLAKE2b-256 checksum
How to use checksums
5c02c8a570691e266c2e2b84b424a3fa6c65d52f4af0990dc35b941c84e67ba4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.6

Release history Release notifications | RSS feed

This release

1.9 This release

1 release file

1.8

1 release file

1.7

1 release file

1.6

1 release file

1.5

1 release file

1.4

1 release file

1.3

1 release file

1.2

1 release file

1.1

1 release file

1.0

1 release file

0.9

1 release file

0.8

1 release file

0.7

1 release file

0.6

1 release file

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page