summaryrefslogtreecommitdiff
path: root/app/src/urls.py
blob: c9e8077aa5a91e0b0e99c2ca3f04076bb7b78054 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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",
    )),
)