--- /dev/null
+from django.conf import settings
+from django.conf.urls.defaults import patterns, include, url
+from django.views.generic import DetailView, ListView
+import taggit.models
+
+import models
+
+# Uncomment the next two lines to enable the admin:
+from django.contrib import admin
+admin.autodiscover()
+
+urlpatterns = patterns('',
+ url(r'^$', ListView.as_view(
+ queryset=models.Recipe.objects.all().order_by('name'),
+ context_object_name='recipes',
+ template_name='cookbook/recipes.html'),
+ name='recipes'),
+ url(r'^recipe/(?P<pk>\d+)/$', DetailView.as_view(
+ model=models.Recipe, template_name='cookbook/recipe.html'),
+ name='recipe'),
+ url(r'^tags/$', ListView.as_view(
+ queryset=taggit.models.Tag.objects.all(),
+ context_object_name='tags',
+ template_name='cookbook/tags.html'),
+ name='tags'),
+ url(r'^tag/(?P<pk>\d+)/$', 'cookbook.views.tag', name='tag'),
+
+ # Uncomment the admin/doc line below to enable admin documentation:
+ # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
+
+ # Uncomment the next line to enable the admin:
+ url(r'^admin/', include(admin.site.urls), name='admin'),
+
+ url(r'^favicon\.ico$', 'django.views.generic.simple.redirect_to',
+ kwargs={'url': settings.STATIC_URL + 'cookbook.ico'}),
+)