Skip to main content

Class based Django permissions for Django models.

Project description

Simple class based permissions.


  1. Install using pip:

    pip install django-perm
  2. In

  3. In your main, at the end add:

    # Load django-perm
    urlpatterns += patterns('', url('^/perm/', include('perm.urls')))


In your Django app, create a file Its content might look like this:

from perm.decorators import permissions_for
from perm.permissions import ModelPermissions

from .models import Foo

class FooPermissions(ModelPermissions):

    def has_perm_wiggle(self):
        # Let's ask the Foo object
        return self.obj.user_can_wiggle(self.user)

    def get_queryset_perm_change(self):
        # Foo objects can be changed by their owners
        return Foo.objects.filter(user=self.user)


Do you have a question about django-perm? Please ask it on so others can help out and/or learn. Tag your question django-perm if possible.

Bugs and requests

If you have found a bug or a request for additional functionality, please use the issue tracker on GitHub.


django-perm is written by Dylan Verheul (


You can use this under Apache 2.0. See LICENSE file for details.

Project details

Download files

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

Files for django-perm, version 2.5.0
Filename, size File type Python version Upload date Hashes
Filename, size django-perm-2.5.0.tar.gz (8.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page