Skip to content

Commit

Permalink
Add note about Django 1.8+ TEMPLATES setting
Browse files Browse the repository at this point in the history
  • Loading branch information
darklow committed Oct 8, 2016
1 parent 42ec2ee commit ed02d16
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 22 deletions.
21 changes: 0 additions & 21 deletions docs/customization.rst

This file was deleted.

22 changes: 21 additions & 1 deletion docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,34 @@ Installation

.. important:: ``'suit'`` must be added before ``'django.contrib.admin'`` and if you are using third-party apps with special admin support (like django-cms) you also need to add ``'suit'`` before ``'cms'``.

3. You also need to add ``'django.core.context_processors.request'`` to ``TEMPLATE_CONTEXT_PROCESSORS`` setting in your Django project ``settings.py`` file.::
3. **For Django < 1.9:** You need to add ``'django.core.context_processors.request'`` to ``TEMPLATE_CONTEXT_PROCESSORS`` setting in your Django project ``settings.py`` file.::

from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS as TCP

TEMPLATE_CONTEXT_PROCESSORS = TCP + (
'django.core.context_processors.request',
)

**For Django >= 1.9 or with new Django ``TEMPLATES`` setting:** Make sure you have ``django.template.context_processors.request`` in your ``TEMPLATES`` ``OPTIONS`` ``context_processors`` setting in your Django project ``settings.py`` file.::


TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request', # Make sure you have this line
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]


Note: This is required to handle left side menu. If by some reason you removed original Django Suit ``menu.html``, you can skip this.


Expand Down

0 comments on commit ed02d16

Please sign in to comment.