Skip to content

Commit 09a1cb9

Browse files
committed
Updated urls.py to use callables for the views and to do away with the patterns function.
1 parent 3557f2b commit 09a1cb9

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

demo-django/demo/urls.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
from django.conf.urls import patterns, url
2-
1+
from django.conf.urls import url
32
from django.contrib import admin
3+
from .views import attrs, index, metadata
44
admin.autodiscover()
55

6-
urlpatterns = patterns(
7-
'',
8-
url(r'^$', 'demo.views.index', name='index'),
9-
url(r'^attrs/$', 'demo.views.attrs', name='attrs'),
10-
url(r'^metadata/$', 'demo.views.metadata', name='metadata'),
11-
)
6+
urlpatterns = [
7+
url(r'^$', index, name='index'),
8+
url(r'^attrs/$', attrs, name='attrs'),
9+
url(r'^metadata/$', metadata, name='metadata'),
10+
]

0 commit comments

Comments
 (0)