Skip to main content

A simple Django app which adds view permissions.

Project description

Build Status Coverage Status Code Climate

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

  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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-admin-view-permission-0.5.tar.gz (6.1 kB view details)

Uploaded Source

File details

Details for the file django-admin-view-permission-0.5.tar.gz.

File metadata

File hashes

Hashes for django-admin-view-permission-0.5.tar.gz
Algorithm Hash digest
SHA256 386beb7955eb80d91925029d0ac7d2ec19c9dbd72b4976ec574dd682090a3ef0
MD5 d5be4e1f0c3fc190322ae9423de1c64e
BLAKE2b-256 4fb360b9686478294034fa7c5850964b79086a12408a09723442f3e9dc6abb71

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page