blob: a2368e3f1324f5631ecdc8a272d2adf80dd633c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
from django.conf.urls import *
from django.views.generic import ListView
from .models import Entry, Book
urlpatterns = patterns('',
(r'topic/(?P<slug>[-\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<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",
)),
)
|