Skip to content

Commit

Permalink
Add some missing settings and remove patterns import (gone in 1.10).
Browse files Browse the repository at this point in the history
  • Loading branch information
ionelmc committed Jan 18, 2017
1 parent 0e322a2 commit 6434e56
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
23 changes: 22 additions & 1 deletion tests/test_project/settings.py
Expand Up @@ -16,7 +16,28 @@
TEMPLATE_DIRS = [
os.path.join(sys.prefix, 'django', 'contrib', 'admin', 'templates')
]

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
# insert your TEMPLATE_DIRS here
],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
# Insert your TEMPLATE_CONTEXT_PROCESSORS here or use this
# list if you haven't customized them:
'django.contrib.auth.context_processors.auth',
'django.template.context_processors.debug',
'django.template.context_processors.i18n',
'django.template.context_processors.media',
'django.template.context_processors.static',
'django.template.context_processors.tz',
'django.contrib.messages.context_processors.messages',
],
},
},
]
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/

Expand Down
5 changes: 2 additions & 3 deletions tests/test_project/urls.py
@@ -1,12 +1,11 @@
import django
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url
from django.contrib import admin

if django.VERSION[:2] < (1, 7):
admin.autodiscover()

urlpatterns = patterns("",
urlpatterns = [
url(r"^", include(admin.site.urls)),
)
]

0 comments on commit 6434e56

Please sign in to comment.