Installing Bridgekeeper

First, install the bridgekeeper package from PyPI, using one of the following, depending on which tool you’re using:

$ pip install bridgekeeper
$ poetry add bridgekeeper
$ pipenv install bridgekeeper

Then, add Bridgekeeper to your settings.py:

 INSTALLED_APPS = (
     'django.contrib.admin',
     'django.contrib.auth',
     # ...
+    'bridgekeeper',
 )

 # ...

 AUTHENTICATION_BACKENDS = (
     'django.contrib.auth.backends.ModelBackend',
+    'bridgekeeper.backends.RulePermissionBackend',
 )

Note

Order doesn’t matter for either the INSTALLED_APPS or AUTHENTICATION_BACKENDS entry.

You might not already have the AUTHENTICATION_BACKENDS setting in your settings.py; if not, you’ll have to add it.