From e271881156a1115037b9827f78f78ca2e46ed9ca Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Fri, 25 Apr 2014 16:37:33 +0100 Subject: [PATCH] Eliminate 'patterns' from wagtaildocs/urls.py and admin_urls.py as per https://code.djangoproject.com/ticket/22218 --- wagtail/wagtaildocs/admin_urls.py | 22 +++++++++++----------- wagtail/wagtaildocs/urls.py | 10 +++++----- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/wagtail/wagtaildocs/admin_urls.py b/wagtail/wagtaildocs/admin_urls.py index cec8505726..9eaa3a50e9 100644 --- a/wagtail/wagtaildocs/admin_urls.py +++ b/wagtail/wagtaildocs/admin_urls.py @@ -1,14 +1,14 @@ -from django.conf.urls import patterns, url +from django.conf.urls import url +from wagtail.wagtaildocs.views import documents, chooser -urlpatterns = patterns( - 'wagtail.wagtaildocs.views', - url(r'^$', 'documents.index', name='wagtaildocs_index'), - url(r'^add/$', 'documents.add', name='wagtaildocs_add_document'), - url(r'^edit/(\d+)/$', 'documents.edit', name='wagtaildocs_edit_document'), - url(r'^delete/(\d+)/$', 'documents.delete', name='wagtaildocs_delete_document'), +urlpatterns = [ + url(r'^$', documents.index, name='wagtaildocs_index'), + url(r'^add/$', documents.add, name='wagtaildocs_add_document'), + url(r'^edit/(\d+)/$', documents.edit, name='wagtaildocs_edit_document'), + url(r'^delete/(\d+)/$', documents.delete, name='wagtaildocs_delete_document'), - url(r'^chooser/$', 'chooser.chooser', name='wagtaildocs_chooser'), - url(r'^chooser/(\d+)/$', 'chooser.document_chosen', name='wagtaildocs_document_chosen'), - url(r'^chooser/upload/$', 'chooser.chooser_upload', name='wagtaildocs_chooser_upload'), -) + url(r'^chooser/$', chooser.chooser, name='wagtaildocs_chooser'), + url(r'^chooser/(\d+)/$', chooser.document_chosen, name='wagtaildocs_document_chosen'), + url(r'^chooser/upload/$', chooser.chooser_upload, name='wagtaildocs_chooser_upload'), +] diff --git a/wagtail/wagtaildocs/urls.py b/wagtail/wagtaildocs/urls.py index 5f8ddaf039..d7c481db69 100644 --- a/wagtail/wagtaildocs/urls.py +++ b/wagtail/wagtaildocs/urls.py @@ -1,6 +1,6 @@ -from django.conf.urls import patterns, url +from django.conf.urls import url +from wagtail.wagtaildocs.views import serve -urlpatterns = patterns( - 'wagtail.wagtaildocs.views', - url(r'^(\d+)/(.*)$', 'serve.serve', name='wagtaildocs_serve'), -) +urlpatterns = [ + url(r'^(\d+)/(.*)$', serve.serve, name='wagtaildocs_serve'), +]