mirror of
https://github.com/jazzband/django-authority.git
synced 2026-04-18 22:11:01 +00:00
--HG-- files : docs/check_decorator.txt files : docs/check_templates.txt files : docs/configuration.txt files : docs/create_basic_permission.txt files : docs/create_custom_permission.txt files : docs/support.txt files : docs/tips_tricks.txt
51 lines
1.1 KiB
Text
51 lines
1.1 KiB
Text
.. _configuration:
|
|
|
|
=============
|
|
Configuration
|
|
=============
|
|
|
|
.. index::
|
|
single: urls.py
|
|
single: settings.py
|
|
single: autodiscover
|
|
|
|
settings.py
|
|
===========
|
|
|
|
To enable django-authority you just need to add the package to your
|
|
``INSTALLED_APPS`` setting within your ``settings.py``::
|
|
|
|
# settings.py
|
|
INSTALLED_APPS = (
|
|
...
|
|
'authority',
|
|
)
|
|
|
|
Make sure your ``settings.py`` contains the following settings to enable the
|
|
context processors::
|
|
|
|
TEMPLATE_CONTEXT_PROCESSORS = (
|
|
'django.core.context_processors.auth',
|
|
'django.core.context_processors.debug',
|
|
'django.core.context_processors.i18n',
|
|
'django.core.context_processors.media',
|
|
'django.core.context_processors.request',
|
|
)
|
|
|
|
urls.py
|
|
=======
|
|
|
|
You also have to modify your root URLConf (e.g. ``urls.py``) to include the
|
|
app's URL configuration and automatically discover all the permission
|
|
classes you defined::
|
|
|
|
import authority
|
|
|
|
authority.autodiscover()
|
|
|
|
urlpatterns += patterns('',
|
|
(r'^authority/', include('authority.urls')),
|
|
)
|
|
|
|
|
|
That's all (for now).
|