mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-22 17:47:08 +03:00
Use list, instead of 'patterns' for urlpatterns
This commit is contained in:
parent
e07e436b46
commit
b60e13ed31
|
@ -2,12 +2,12 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from django.conf import settings
|
||||
from django.conf.urls import include, patterns, url
|
||||
from django.conf.urls import include, url
|
||||
from django.conf.urls.static import static
|
||||
from django.contrib import admin
|
||||
from django.views.generic import TemplateView
|
||||
|
||||
urlpatterns = patterns('', # noqa
|
||||
urlpatterns = [
|
||||
url(r'^$', TemplateView.as_view(template_name='pages/home.html'), name="home"),
|
||||
url(r'^about/$', TemplateView.as_view(template_name='pages/about.html'), name="about"),
|
||||
|
||||
|
@ -21,4 +21,4 @@ urlpatterns = patterns('', # noqa
|
|||
# Your stuff: custom urls includes go here
|
||||
|
||||
|
||||
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
from django.conf.urls import patterns, url
|
||||
from django.conf.urls import url
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = patterns('',
|
||||
# URL pattern for the UserListView # noqa
|
||||
urlpatterns = [
|
||||
# URL pattern for the UserListView
|
||||
url(regex=r'^$', view=views.UserListView.as_view(), name='list'),
|
||||
|
||||
# URL pattern for the UserRedirectView
|
||||
|
@ -17,4 +17,4 @@ urlpatterns = patterns('',
|
|||
|
||||
# URL pattern for the UserUpdateView
|
||||
url(regex=r'^~update/$', view=views.UserUpdateView.as_view(), name='update'),
|
||||
)
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue
Block a user