diff options
author | Mike Crute <mcrute@gmail.com> | 2015-07-29 18:33:04 -0700 |
---|---|---|
committer | Mike Crute <mcrute@gmail.com> | 2015-07-29 18:33:04 -0700 |
commit | c29586b5ddf030ebc406aa7008ebfefc858a0af4 (patch) | |
tree | b4b3ba26bb2b4ceb25f122b7f39216816723f080 /recipe/urls.py | |
parent | 1b2bd5c3fd47515ca8e96b4dce1b9ca9b88b5cb1 (diff) | |
download | greenbox-master.tar.bz2 greenbox-master.tar.xz greenbox-master.zip |
Diffstat (limited to 'recipe/urls.py')
-rw-r--r-- | recipe/urls.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/recipe/urls.py b/recipe/urls.py index 4c937a0..00bc44a 100644 --- a/recipe/urls.py +++ b/recipe/urls.py | |||
@@ -1,7 +1,10 @@ | |||
1 | from django.conf.urls.defaults import patterns, url | 1 | from django.conf.urls import patterns, url |
2 | from django.views.generic import DetailView, ListView | ||
3 | |||
4 | from recipe.models import Recipe | ||
2 | 5 | ||
3 | 6 | ||
4 | urlpatterns = patterns('recipe.views', | 7 | urlpatterns = patterns('recipe.views', |
5 | url(r'^(?P<slug>[^/]+)', 'recipe_details'), | 8 | url(r'^(?P<slug>[^/]+)', DetailView.as_view(model=Recipe)), |
6 | url(r'^$', 'recipe_list'), | 9 | url(r'^$', ListView.as_view(model=Recipe)), |
7 | ) | 10 | ) |