diff options
Diffstat (limited to 'app/src/urls.py')
-rw-r--r-- | app/src/urls.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/src/urls.py b/app/src/urls.py new file mode 100644 index 0000000..c9e8077 --- /dev/null +++ b/app/src/urls.py @@ -0,0 +1,16 @@ +from django.conf.urls import * +from django.views.generic import ListView + +from .models import Entry, Book + +urlpatterns = patterns('', + (r'books/$', ListView.as_view( + queryset=Book.objects.filter(status__exact=1).order_by('-pub_date'), + template_name="archives/src_books.html", + )), + (r'(?P<slug>[-\w]+)/$', 'src.views.detail'), + (r'^$', ListView.as_view( + queryset=Entry.objects.filter(status__exact=1).order_by('-pub_date'), + template_name="archives/src_home.html", + )), +) |