Skip to content

Commit 3bd2e2b

Browse files
committed
django 2.1 support
1 parent 063dd8d commit 3bd2e2b

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

example/tumblelog/tumblelog/settings.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,16 @@
8787
# Make this unique, and don't share it with anybody.
8888
SECRET_KEY = 'd2h8yt+x2g0$+e#9$z5z$auy%v0axov(wt3o*bj1#h^1+x^n(!'
8989

90-
MIDDLEWARE_CLASSES = (
91-
'django.middleware.common.CommonMiddleware',
90+
MIDDLEWARE = [
91+
'django.middleware.security.SecurityMiddleware',
9292
'django.contrib.sessions.middleware.SessionMiddleware',
93+
'django.middleware.common.CommonMiddleware',
9394
'django.middleware.csrf.CsrfViewMiddleware',
9495
'django.contrib.auth.middleware.AuthenticationMiddleware',
9596
'django.contrib.messages.middleware.MessageMiddleware',
96-
# Uncomment the next line for simple clickjacking protection:
97-
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
98-
)
97+
'django.middleware.clickjacking.XFrameOptionsMiddleware',
98+
]
99+
99100

100101
ROOT_URLCONF = 'tumblelog.urls'
101102

example/tumblelog/tumblelog/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
url(r'^new/$', AddPostView.as_view(), name="post_new"),
2323
url(r'^new/(?P<post_type>(post|video|image|quote|music))/$',
2424
AddPostView.as_view(), name="post_new"),
25-
url(r'^admin/', include(mongo_admin.site.urls)),
25+
url(r'^admin/', mongo_admin.site.urls),
2626
url(r'^image-file/(?P<slug>[a-zA-Z0-9-]+)/', ImageFileView.as_view(),
2727
name="image_file"),
2828
url(r'^(?P<slug>[a-zA-Z0-9-]+)/', include(post_patterns)),

0 commit comments

Comments
 (0)