diff --git a/wagtail/wagtailsnippets/urls.py b/wagtail/wagtailsnippets/urls.py index 927c30c284..eb7dc01129 100644 --- a/wagtail/wagtailsnippets/urls.py +++ b/wagtail/wagtailsnippets/urls.py @@ -1,16 +1,16 @@ -from django.conf.urls import patterns, url +from django.conf.urls import url +from wagtail.wagtailsnippets.views import chooser, snippets -urlpatterns = patterns( - 'wagtail.wagtailsnippets.views', - url(r'^$', 'snippets.index', name='wagtailsnippets_index'), +urlpatterns = [ + url(r'^$', snippets.index, name='wagtailsnippets_index'), - url(r'^choose/$', 'chooser.choose', name='wagtailsnippets_choose_generic'), - url(r'^choose/(\w+)/(\w+)/$', 'chooser.choose', name='wagtailsnippets_choose'), - url(r'^choose/(\w+)/(\w+)/(\d+)/$', 'chooser.chosen', name='wagtailsnippets_chosen'), + url(r'^choose/$', chooser.choose, name='wagtailsnippets_choose_generic'), + url(r'^choose/(\w+)/(\w+)/$', chooser.choose, name='wagtailsnippets_choose'), + url(r'^choose/(\w+)/(\w+)/(\d+)/$', chooser.chosen, name='wagtailsnippets_chosen'), - url(r'^(\w+)/(\w+)/$', 'snippets.list', name='wagtailsnippets_list'), - url(r'^(\w+)/(\w+)/new/$', 'snippets.create', name='wagtailsnippets_create'), - url(r'^(\w+)/(\w+)/(\d+)/$', 'snippets.edit', name='wagtailsnippets_edit'), - url(r'^(\w+)/(\w+)/(\d+)/delete/$', 'snippets.delete', name='wagtailsnippets_delete'), -) + url(r'^(\w+)/(\w+)/$', snippets.list, name='wagtailsnippets_list'), + url(r'^(\w+)/(\w+)/new/$', snippets.create, name='wagtailsnippets_create'), + url(r'^(\w+)/(\w+)/(\d+)/$', snippets.edit, name='wagtailsnippets_edit'), + url(r'^(\w+)/(\w+)/(\d+)/delete/$', snippets.delete, name='wagtailsnippets_delete'), +]