Skip to content

Commit 2193f0d

Browse files
committed
fix running tests in Django 1.11
1 parent 134a692 commit 2193f0d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

example/example/urls.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import django
2-
from django.conf.urls import patterns, include, url
2+
from django.conf.urls import include, url
33
from django.contrib import admin
44

55
if django.VERSION < (1,7):
66
admin.autodiscover()
77

8-
urlpatterns = patterns('',
8+
urlpatterns = [
99
# Examples:
1010
# url(r'^$', 'example.views.home', name='home'),
1111
# url(r'^blog/', include('blog.urls')),
1212

1313
url(r'^admin/', include(admin.site.urls)),
14-
)
14+
]

runtests.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
'BACKEND': 'django.template.backends.django.DjangoTemplates',
2525
'DIRS': (),
2626
'OPTIONS': {
27+
'debug': True,
2728
'loaders': (
2829
'django.template.loaders.filesystem.Loader',
2930
'django.template.loaders.app_directories.Loader',
@@ -42,6 +43,7 @@
4243
)
4344
else:
4445
template_settings = dict(
46+
TEMPLATE_DEBUG = True,
4547
TEMPLATE_LOADERS = (
4648
'django.template.loaders.app_directories.Loader',
4749
'django.template.loaders.filesystem.Loader',
@@ -53,7 +55,6 @@
5355

5456
settings.configure(
5557
DEBUG = False, # will be False anyway by DjangoTestRunner.
56-
TEMPLATE_DEBUG = True,
5758
DATABASES = {
5859
'default': {
5960
'ENGINE': 'django.db.backends.sqlite3',

0 commit comments

Comments
 (0)