Make Django urlpatterns list of url()s

- Support for legacy pattern() mechanism will be removed in Django
  1.10.  Currently we see a warning for each Plinth module.
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2015-12-05 09:33:23 -05:00
1 parent a432e16ed7
commit a69f419c3c
29 files changed
+197 -176

No files matched your search

+5 -6
View File
@@ -19,17 +19,16 @@
URLs for the First Boot module
"""
from django.conf.urls import patterns, url
from django.conf.urls import url
from stronghold.decorators import public
from .views import State0View, State1View
from .views import State0View, State1View, state10
urlpatterns = patterns( # pylint: disable-msg=C0103
'plinth.modules.first_boot.views',
urlpatterns = [
# Take care of the firstboot middleware when changing URLs
url(r'^firstboot/$', public(State0View.as_view()), name='index'),
url(r'^firstboot/state0/$', public(State0View.as_view()), name='state0'),
url(r'^firstboot/state1/$', public(State1View.as_view()), name='state1'),
url(r'^firstboot/state10/$', 'state10', name='state10'),
)
url(r'^firstboot/state10/$', state10, name='state10'),
]