Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

pypm install django-bop

How to install django-bop

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install django-bop
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.3 Available View build log
Windows (64-bit)
0.3 Available View build log
Mac OS X (10.5+)
0.3 Available View build log
Linux (32-bit)
0.3 Available View build log
Linux (64-bit)
0.3 Available View build log
Depended by
Lastest release
version 0.3 on Oct 21st, 2011

Django-bop provides Basic Object-level Permissions for django 1.2 and later. It is based on the django-advent article 'Object Permissions' by Florian Apolloner.

Although there are a few other permission backends I wanted a simple(r) backend that closely matches the existing django functionality.


Django-bop provides several mechanisms to manage and check the permissions for objects:

  • bop.admin.ObjectAdmin
  • bop.forms.inline_permissions_form_factory
  • api.grant and api.revoke
  • bop.backends.ObjectBackend
  • ifhasperm templatetag
  • bop.managers.UserObjectManager
  • bop.managers.ObjectPermissionManager

Also of interest:

  • has_model_perms


Install it in your (virtual) environment:

$ pip install django-bop

If you haven't already you should also install south:

$ pip install South

Add 'bop' (and south) to you INSTALLED_APPS in settings.py:


While in settings.py specify the AUTHENTICATION_BACKENDS:


If you, optionally, want to give permissions to anonymous users you should do the following:

  1. Add a user to contrib.auth.models.User to represent anonymous users (e.g. via the admin). Give it an appropriate name (anon / anonymous) so it easily recognized when assigning permissions.

  2. Add ANONYMOUS_USER_ID to settings.py:


If, in addition -- and again optionally -- you want to support Model-permissions for anonymous users, you can add the AnonymousModelBackend:


When all configuration is done, bring the database up to date:

$ ./manage.py migrate bop

Subscribe to package updates

Last updated Oct 21st, 2011

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.