Skip to content

Commit

Permalink
Added to post_new to allow 24. Homework: add security to work
Browse files Browse the repository at this point in the history
If post_new isn’t named, step 24 of the tutorial ends up in an error.
  • Loading branch information
JesseIrwin committed Aug 4, 2014
1 parent b955d19 commit 08fe298
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django_forms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ After saving and refreshing the page `http://127.0.0.1:8000` you will obviously

We open `blog/urls.py` and add a line:

url(r'^post/new/$', views.post_new),
url(r'^post/new/$', views.post_new, name='post_new'),

And the final code will look like this:

Expand All @@ -91,7 +91,7 @@ And the final code will look like this:
urlpatterns = patterns('',
url(r'^$', views.post_list),
url(r'^post/(?P<pk>[0-9]+)/$', views.post_detail),
url(r'^post/new/$', views.post_new),
url(r'^post/new/$', views.post_new, name='post_new'),
)

After refreshing the site, we see an `AttributeError`, since we don't have `post_new` view implemented. Let's add it right now.
Expand Down

0 comments on commit 08fe298

Please sign in to comment.