If you are tempted to change your urls.py to match the snippet provided in this chapter, don't do it!
I am struggling with regular expressions, but I kind of hacked my way through chapter 8 and got the forms to work. In this chapter, however, I noticed that
url(r'^category/(?P<category_name_slug>[\w\-]+)/$', views.category, name='category'),
changed to:
url(r'^category/(?P<category_name_slug>\w+)$', views.category, name='category')
do not change it! Leave it as url(r'^category/(?P<category_name_slug>[\w\-]+)/$', views.category, name='category') or your application will complain.
No comments:
Post a Comment