I'm following a tutorial, and am getting an 404 error that http://127.0.0.1:8000/restaurants/ is not being matched by
url(r'^restaurants/(?P<slug>\w+)/$', RestaurantListView.as_view())
while http://127.0.0.1:8000/restaurants/x with any x is. How should I rewrite the path to match the url without any additional /x?
... Error message:
Using the URLconf defined in projekt.urls, Django tried these URL patterns, in this order:
admin/
^contact/$
^$
^about/$
^restaurants/(?P<slug>\w+)/$
The current path, restaurants/, didn't match any of these.