diff comments/urls.py @ 1028:5ba2508939f7

Django 1.8 changes; first batch.
author Brian Neal <bgneal@gmail.com>
date Tue, 15 Dec 2015 21:01:07 -0600
parents ee87ea74d46b
children 110bbc78a482
line wrap: on
line diff
--- a/comments/urls.py	Mon Dec 14 20:42:20 2015 -0600
+++ b/comments/urls.py	Tue Dec 15 21:01:07 2015 -0600
@@ -1,16 +1,16 @@
 """
 URLs for the comments application.
 """
-from django.conf.urls import patterns, url
+from django.conf.urls import url
+import django.contrib.contenttypes.views
 
-urlpatterns = patterns('comments.views',
-    url(r'^flag/$', 'flag_comment', name='comments-flag'),
-    url(r'^markdown/$', 'markdown_preview', name='comments-markdown_preview'),
-    url(r'^post/$', 'post_comment', name='comments-post'),
-)
+import comments.views
 
-urlpatterns += patterns('',
+urlpatterns = [
+    url(r'^flag/$', comments.views.flag_comment, name='comments-flag'),
+    url(r'^markdown/$', comments.views.markdown_preview, name='comments-markdown_preview'),
+    url(r'^post/$', comments.views.post_comment, name='comments-post'),
     url(r'^cr/(\d+)/(\d+)/$',
-        'django.contrib.contenttypes.views.shortcut',
+        django.contrib.contenttypes.views.shortcut,
         name='comments-url-redirect'),
-)
+]