Skip to content

Commit b70a6c5

Browse files
committed
update stage 2 blog urls to avoid deprecation warnings started in 1.9
1 parent 1da4a3c commit b70a6c5

File tree

1 file changed

+8
-6
lines changed
  • resources/session08/mysite_stage_2/myblog

1 file changed

+8
-6
lines changed
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
from django.conf.urls import patterns, url
1+
from django.conf.urls import url
22

3+
from myblog.views import stub_view
4+
from myblog.views import list_view
35

4-
urlpatterns = patterns(
5-
'myblog.views',
6+
7+
urlpatterns = [
68
url(r'^$',
7-
'list_view',
9+
list_view,
810
name="blog_index"),
911
url(r'^posts/(?P<post_id>\d+)/$',
10-
'stub_view',
12+
stub_view,
1113
name='blog_detail'),
12-
)
14+
]

0 commit comments

Comments
 (0)