from django.conf.urls import * from django.views.generic import ListView from .models import Entry, Book urlpatterns = patterns('', (r'topic/(?P[-\w]+)/$', 'src.views.topic'), (r'books/$', ListView.as_view( queryset=Book.objects.filter(status__exact=1).order_by('-pub_date'), template_name="archives/src_books.html", )), (r'(?P[-\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", )), )