diff options
Diffstat (limited to 'app/lib/django_comments/urls.py')
-rw-r--r-- | app/lib/django_comments/urls.py | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/app/lib/django_comments/urls.py b/app/lib/django_comments/urls.py index e02bab0..fb8f972 100644 --- a/app/lib/django_comments/urls.py +++ b/app/lib/django_comments/urls.py @@ -1,16 +1,18 @@ -from django.conf.urls import patterns, url +from django.conf.urls import url +from .views import comments, moderation +from django.contrib.contenttypes.views import shortcut -urlpatterns = patterns('django_comments.views', - url(r'^post/$', 'comments.post_comment', name='comments-post-comment'), - url(r'^posted/$', 'comments.comment_done', name='comments-comment-done'), - url(r'^flag/(\d+)/$', 'moderation.flag', name='comments-flag'), - url(r'^flagged/$', 'moderation.flag_done', name='comments-flag-done'), - url(r'^delete/(\d+)/$', 'moderation.delete', name='comments-delete'), - url(r'^deleted/$', 'moderation.delete_done', name='comments-delete-done'), - url(r'^approve/(\d+)/$', 'moderation.approve', name='comments-approve'), - url(r'^approved/$', 'moderation.approve_done', name='comments-approve-done'), -) +urlpatterns = [ + url(r'^post/$', comments.post_comment, name='comments-post-comment'), + url(r'^posted/$', comments.comment_done, name='comments-comment-done'), + url(r'^flag/(\d+)/$', moderation.flag, name='comments-flag'), + url(r'^flagged/$', moderation.flag_done, name='comments-flag-done'), + url(r'^delete/(\d+)/$', moderation.delete, name='comments-delete'), + url(r'^deleted/$', moderation.delete_done, name='comments-delete-done'), + url(r'^approve/(\d+)/$', moderation.approve, name='comments-approve'), + url(r'^approved/$', moderation.approve_done, name='comments-approve-done'), +] -urlpatterns += patterns('', - url(r'^cr/(\d+)/(.+)/$', 'django.contrib.contenttypes.views.shortcut', name='comments-url-redirect'), -) +urlpatterns += [ + url(r'^cr/(\d+)/(.+)/$', shortcut, name='comments-url-redirect'), +] |