Skip to content

Commit

Permalink
Tests: Add Django 1.9+ TEMPLATE setting
Browse files Browse the repository at this point in the history
  • Loading branch information
darklow committed Aug 18, 2016
1 parent c72bedb commit 5486924
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions suit/tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,22 @@
TEMPLATE_CONTEXT_PROCESSORS = list(TCP) + [
'django.core.context_processors.request',
]
except ImportError:
# Django 1.9+ has context_processors key in TEMPLATES settings
pass
except ImportError: # Django 1.9+
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]

SUIT_CONFIG = {}
TEST_RUNNER = 'suit.tests.SuitTestRunner'

0 comments on commit 5486924

Please sign in to comment.