Installation¶
Getting a module¶
Grab it from source repository:
pip install -r git+git://github.com/cypreess/django-menus.git#egg=django-menus
Enabling request template context processor¶
Menuing system needs to know which page is currently viewed. It reads url from request
attribute of current context, therefore
you need to add proper context processor.
Django brings a TEMPLATE_CONTEXT_PROCESSORS
setting variable to define any set of context processors. To avoid hard-coding the default set of TEMPLATE_CONTEXT_PROCESSORS
use following code:
from django.conf import global_settings
TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + (
'django.core.context_processors.request',
)