2015-01-12 11:00:27 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
2014-04-02 00:46:34 +00:00
|
|
|
from django.conf.urls import url
|
2014-08-12 14:54:42 +00:00
|
|
|
from django.contrib.auth import views as auth_views
|
2014-12-27 07:16:53 +00:00
|
|
|
from django.contrib.auth.decorators import login_required
|
2011-01-24 14:24:35 +00:00
|
|
|
from django.views.decorators.cache import cache_page
|
2011-10-13 21:34:56 +00:00
|
|
|
from django.views.generic import TemplateView
|
2010-10-18 13:34:47 +00:00
|
|
|
|
2012-05-20 11:18:42 +00:00
|
|
|
from . import models
|
2011-10-13 21:34:56 +00:00
|
|
|
from . import views
|
2010-10-18 13:34:47 +00:00
|
|
|
|
|
|
|
|
2014-04-02 00:46:34 +00:00
|
|
|
urlpatterns = [
|
2010-10-18 13:34:47 +00:00
|
|
|
# TemplateView
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^template/no_template/$',
|
2011-02-14 13:05:14 +00:00
|
|
|
TemplateView.as_view()),
|
2014-12-27 07:16:53 +00:00
|
|
|
url(r'^template/login_required/$',
|
|
|
|
login_required(TemplateView.as_view())),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^template/simple/(?P<foo>\w+)/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
TemplateView.as_view(template_name='generic_views/about.html')),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^template/custom/(?P<foo>\w+)/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.CustomTemplateView.as_view(template_name='generic_views/about.html')),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^template/content_type/$',
|
2013-01-30 20:26:17 +00:00
|
|
|
TemplateView.as_view(template_name='generic_views/robots.txt', content_type='text/plain')),
|
2010-10-18 13:34:47 +00:00
|
|
|
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^template/cached/(?P<foo>\w+)/$',
|
2011-01-24 14:24:35 +00:00
|
|
|
cache_page(2.0)(TemplateView.as_view(template_name='generic_views/about.html'))),
|
|
|
|
|
2010-10-18 13:34:47 +00:00
|
|
|
# DetailView
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^detail/obj/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.ObjectDetail.as_view()),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^detail/artist/(?P<pk>[0-9]+)/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.ArtistDetail.as_view(),
|
|
|
|
name="artist_detail"),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^detail/author/(?P<pk>[0-9]+)/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.AuthorDetail.as_view(),
|
|
|
|
name="author_detail"),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^detail/author/bycustompk/(?P<foo>[0-9]+)/$',
|
2011-07-29 09:41:00 +00:00
|
|
|
views.AuthorDetail.as_view(pk_url_kwarg='foo')),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^detail/author/byslug/(?P<slug>[\w-]+)/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.AuthorDetail.as_view()),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^detail/author/bycustomslug/(?P<foo>[\w-]+)/$',
|
2011-07-29 09:41:00 +00:00
|
|
|
views.AuthorDetail.as_view(slug_url_kwarg='foo')),
|
2014-09-13 01:23:35 +00:00
|
|
|
url(r'^detail/author/bypkignoreslug/(?P<pk>[0-9]+)-(?P<slug>[\w-]+)/$',
|
|
|
|
views.AuthorDetail.as_view()),
|
|
|
|
url(r'^detail/author/bypkandslug/(?P<pk>[0-9]+)-(?P<slug>[\w-]+)/$',
|
|
|
|
views.AuthorDetail.as_view(query_pk_and_slug=True)),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^detail/author/(?P<pk>[0-9]+)/template_name_suffix/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.AuthorDetail.as_view(template_name_suffix='_view')),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^detail/author/(?P<pk>[0-9]+)/template_name/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.AuthorDetail.as_view(template_name='generic_views/about.html')),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^detail/author/(?P<pk>[0-9]+)/context_object_name/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.AuthorDetail.as_view(context_object_name='thingy')),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^detail/author/(?P<pk>[0-9]+)/dupe_context_object_name/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.AuthorDetail.as_view(context_object_name='object')),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^detail/page/(?P<pk>[0-9]+)/field/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.PageDetail.as_view()),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^detail/author/invalid/url/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.AuthorDetail.as_view()),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^detail/author/invalid/qs/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.AuthorDetail.as_view(queryset=None)),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^detail/nonmodel/1/$',
|
2012-06-08 22:12:14 +00:00
|
|
|
views.NonModelDetail.as_view()),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^detail/doesnotexist/(?P<pk>[0-9]+)/$',
|
2013-12-14 23:15:35 +00:00
|
|
|
views.ObjectDoesNotExistDetail.as_view()),
|
2012-12-04 12:18:57 +00:00
|
|
|
# FormView
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^contact/$',
|
2012-12-04 12:18:57 +00:00
|
|
|
views.ContactView.as_view()),
|
|
|
|
|
2010-10-18 13:34:47 +00:00
|
|
|
# Create/UpdateView
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^edit/artists/create/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.ArtistCreate.as_view()),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^edit/artists/(?P<pk>[0-9]+)/update/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.ArtistUpdate.as_view()),
|
|
|
|
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^edit/authors/create/naive/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.NaiveAuthorCreate.as_view()),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^edit/authors/create/redirect/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.NaiveAuthorCreate.as_view(success_url='/edit/authors/create/')),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^edit/authors/create/interpolate_redirect/$',
|
2010-12-04 11:20:30 +00:00
|
|
|
views.NaiveAuthorCreate.as_view(success_url='/edit/author/%(id)d/update/')),
|
2015-01-12 11:00:27 +00:00
|
|
|
url(r'^edit/authors/create/interpolate_redirect_nonascii/$',
|
|
|
|
views.NaiveAuthorCreate.as_view(success_url='/%C3%A9dit/author/{id}/update/')),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^edit/authors/create/restricted/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.AuthorCreateRestricted.as_view()),
|
2015-01-12 11:00:27 +00:00
|
|
|
url(r'^[eé]dit/authors/create/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.AuthorCreate.as_view()),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^edit/authors/create/special/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.SpecializedAuthorCreate.as_view()),
|
|
|
|
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^edit/author/(?P<pk>[0-9]+)/update/naive/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.NaiveAuthorUpdate.as_view()),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^edit/author/(?P<pk>[0-9]+)/update/redirect/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.NaiveAuthorUpdate.as_view(success_url='/edit/authors/create/')),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^edit/author/(?P<pk>[0-9]+)/update/interpolate_redirect/$',
|
2010-12-04 11:20:30 +00:00
|
|
|
views.NaiveAuthorUpdate.as_view(success_url='/edit/author/%(id)d/update/')),
|
2015-01-12 11:00:27 +00:00
|
|
|
url(r'^edit/author/(?P<pk>[0-9]+)/update/interpolate_redirect_nonascii/$',
|
|
|
|
views.NaiveAuthorUpdate.as_view(success_url='/%C3%A9dit/author/{id}/update/')),
|
|
|
|
url(r'^[eé]dit/author/(?P<pk>[0-9]+)/update/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.AuthorUpdate.as_view()),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^edit/author/update/$',
|
2011-02-15 08:12:29 +00:00
|
|
|
views.OneAuthorUpdate.as_view()),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^edit/author/(?P<pk>[0-9]+)/update/special/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.SpecializedAuthorUpdate.as_view()),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^edit/author/(?P<pk>[0-9]+)/delete/naive/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.NaiveAuthorDelete.as_view()),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^edit/author/(?P<pk>[0-9]+)/delete/redirect/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.NaiveAuthorDelete.as_view(success_url='/edit/authors/create/')),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^edit/author/(?P<pk>[0-9]+)/delete/interpolate_redirect/$',
|
2013-02-11 07:39:14 +00:00
|
|
|
views.NaiveAuthorDelete.as_view(success_url='/edit/authors/create/?deleted=%(id)s')),
|
2015-01-12 11:00:27 +00:00
|
|
|
url(r'^edit/author/(?P<pk>[0-9]+)/delete/interpolate_redirect_nonascii/$',
|
|
|
|
views.NaiveAuthorDelete.as_view(success_url='/%C3%A9dit/authors/create/?deleted={id}')),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^edit/author/(?P<pk>[0-9]+)/delete/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.AuthorDelete.as_view()),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^edit/author/(?P<pk>[0-9]+)/delete/special/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.SpecializedAuthorDelete.as_view()),
|
|
|
|
|
|
|
|
# ArchiveIndexView
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^dates/books/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookArchive.as_view()),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^dates/books/context_object_name/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookArchive.as_view(context_object_name='thingies')),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^dates/books/allow_empty/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookArchive.as_view(allow_empty=True)),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^dates/books/template_name/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookArchive.as_view(template_name='generic_views/list.html')),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^dates/books/template_name_suffix/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookArchive.as_view(template_name_suffix='_detail')),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^dates/books/invalid/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookArchive.as_view(queryset=None)),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^dates/books/paginated/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookArchive.as_view(paginate_by=10)),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^dates/books/reverse/$',
|
2012-05-20 11:18:42 +00:00
|
|
|
views.BookArchive.as_view(queryset=models.Book.objects.order_by('pubdate'))),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^dates/books/by_month/$',
|
2012-08-18 15:28:17 +00:00
|
|
|
views.BookArchive.as_view(date_list_period='month')),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^dates/booksignings/$',
|
2012-04-30 18:41:38 +00:00
|
|
|
views.BookSigningArchive.as_view()),
|
2014-05-19 21:27:09 +00:00
|
|
|
url(r'^dates/books/sortedbyname/$',
|
|
|
|
views.BookArchive.as_view(ordering='name')),
|
|
|
|
url(r'^dates/books/sortedbynamedec/$',
|
|
|
|
views.BookArchive.as_view(ordering='-name')),
|
|
|
|
|
2010-10-18 13:34:47 +00:00
|
|
|
|
|
|
|
# ListView
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^list/dict/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.DictList.as_view()),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^list/dict/paginated/$',
|
2010-12-09 02:34:14 +00:00
|
|
|
views.DictList.as_view(paginate_by=1)),
|
2011-01-03 13:15:58 +00:00
|
|
|
url(r'^list/artists/$',
|
|
|
|
views.ArtistList.as_view(),
|
|
|
|
name="artists_list"),
|
2010-10-18 13:34:47 +00:00
|
|
|
url(r'^list/authors/$',
|
|
|
|
views.AuthorList.as_view(),
|
|
|
|
name="authors_list"),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^list/authors/paginated/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.AuthorList.as_view(paginate_by=30)),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^list/authors/paginated/(?P<page>[0-9]+)/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.AuthorList.as_view(paginate_by=30)),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^list/authors/paginated-orphaned/$',
|
2012-11-21 03:45:38 +00:00
|
|
|
views.AuthorList.as_view(paginate_by=30, paginate_orphans=2)),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^list/authors/notempty/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.AuthorList.as_view(allow_empty=False)),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^list/authors/notempty/paginated/$',
|
2012-05-17 11:29:52 +00:00
|
|
|
views.AuthorList.as_view(allow_empty=False, paginate_by=2)),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^list/authors/template_name/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.AuthorList.as_view(template_name='generic_views/list.html')),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^list/authors/template_name_suffix/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.AuthorList.as_view(template_name_suffix='_objects')),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^list/authors/context_object_name/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.AuthorList.as_view(context_object_name='author_list')),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^list/authors/dupe_context_object_name/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.AuthorList.as_view(context_object_name='object_list')),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^list/authors/invalid/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.AuthorList.as_view(queryset=None)),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^list/authors/paginated/custom_class/$',
|
2010-12-05 04:32:36 +00:00
|
|
|
views.AuthorList.as_view(paginate_by=5, paginator_class=views.CustomPaginator)),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^list/authors/paginated/custom_page_kwarg/$',
|
2012-10-25 12:19:53 +00:00
|
|
|
views.AuthorList.as_view(paginate_by=30, page_kwarg='pagina')),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^list/authors/paginated/custom_constructor/$',
|
2010-12-05 04:32:36 +00:00
|
|
|
views.AuthorListCustomPaginator.as_view()),
|
2014-05-19 21:27:09 +00:00
|
|
|
url(r'^list/books/sorted/$',
|
|
|
|
views.BookList.as_view(ordering='name')),
|
|
|
|
url(r'^list/books/sortedbypagesandnamedec/$',
|
|
|
|
views.BookList.as_view(ordering=('pages', '-name'))),
|
2010-10-18 13:34:47 +00:00
|
|
|
|
|
|
|
# YearArchiveView
|
2014-03-02 14:25:53 +00:00
|
|
|
# Mixing keyword and positional captures below is intentional; the views
|
2010-10-18 13:34:47 +00:00
|
|
|
# ought to be able to accept either.
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookYearArchive.as_view()),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/make_object_list/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookYearArchive.as_view(make_object_list=True)),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/allow_empty/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookYearArchive.as_view(allow_empty=True)),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/allow_future/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookYearArchive.as_view(allow_future=True)),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/paginated/$',
|
2011-04-22 12:03:58 +00:00
|
|
|
views.BookYearArchive.as_view(make_object_list=True, paginate_by=30)),
|
2014-05-19 21:27:09 +00:00
|
|
|
url(r'^dates/books/(?P<year>\d{4})/sortedbyname/$',
|
|
|
|
views.BookYearArchive.as_view(make_object_list=True, ordering='name')),
|
|
|
|
url(r'^dates/books/(?P<year>\d{4})/sortedbypageandnamedec/$',
|
|
|
|
views.BookYearArchive.as_view(make_object_list=True, ordering=('pages', '-name'))),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^dates/books/no_year/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookYearArchive.as_view()),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/reverse/$',
|
2012-05-20 11:18:42 +00:00
|
|
|
views.BookYearArchive.as_view(queryset=models.Book.objects.order_by('pubdate'))),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/booksignings/(?P<year>[0-9]{4})/$',
|
2012-04-30 18:41:38 +00:00
|
|
|
views.BookSigningYearArchive.as_view()),
|
2010-10-18 13:34:47 +00:00
|
|
|
|
|
|
|
# MonthArchiveView
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookMonthArchive.as_view()),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[0-9]{1,2})/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookMonthArchive.as_view(month_format='%m')),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/allow_empty/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookMonthArchive.as_view(allow_empty=True)),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/allow_future/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookMonthArchive.as_view(allow_future=True)),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/paginated/$',
|
2011-04-22 12:03:58 +00:00
|
|
|
views.BookMonthArchive.as_view(paginate_by=30)),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/no_month/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookMonthArchive.as_view()),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/booksignings/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/$',
|
2012-04-30 18:41:38 +00:00
|
|
|
views.BookSigningMonthArchive.as_view()),
|
2010-10-18 13:34:47 +00:00
|
|
|
|
|
|
|
# WeekArchiveView
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/week/(?P<week>[0-9]{1,2})/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookWeekArchive.as_view()),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/week/(?P<week>[0-9]{1,2})/allow_empty/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookWeekArchive.as_view(allow_empty=True)),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/week/(?P<week>[0-9]{1,2})/allow_future/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookWeekArchive.as_view(allow_future=True)),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/week/(?P<week>[0-9]{1,2})/paginated/$',
|
2011-04-22 12:03:58 +00:00
|
|
|
views.BookWeekArchive.as_view(paginate_by=30)),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/week/no_week/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookWeekArchive.as_view()),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/week/(?P<week>[0-9]{1,2})/monday/$',
|
2010-11-23 01:46:48 +00:00
|
|
|
views.BookWeekArchive.as_view(week_format='%W')),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/booksignings/(?P<year>[0-9]{4})/week/(?P<week>[0-9]{1,2})/$',
|
2012-04-30 18:41:38 +00:00
|
|
|
views.BookSigningWeekArchive.as_view()),
|
2010-10-18 13:34:47 +00:00
|
|
|
|
|
|
|
# DayArchiveView
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/(?P<day>[0-9]{1,2})/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookDayArchive.as_view()),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[0-9]{1,2})/(?P<day>[0-9]{1,2})/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookDayArchive.as_view(month_format='%m')),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/(?P<day>[0-9]{1,2})/allow_empty/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookDayArchive.as_view(allow_empty=True)),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/(?P<day>[0-9]{1,2})/allow_future/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookDayArchive.as_view(allow_future=True)),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/(?P<day>[0-9]{1,2})/allow_empty_and_future/$',
|
2012-05-17 15:53:19 +00:00
|
|
|
views.BookDayArchive.as_view(allow_empty=True, allow_future=True)),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/(?P<day>[0-9]{1,2})/paginated/$',
|
2011-04-22 12:03:58 +00:00
|
|
|
views.BookDayArchive.as_view(paginate_by=True)),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/no_day/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookDayArchive.as_view()),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/booksignings/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/(?P<day>[0-9]{1,2})/$',
|
2012-04-30 18:41:38 +00:00
|
|
|
views.BookSigningDayArchive.as_view()),
|
2010-10-18 13:34:47 +00:00
|
|
|
|
|
|
|
# TodayArchiveView
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^dates/books/today/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookTodayArchive.as_view()),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^dates/books/today/allow_empty/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookTodayArchive.as_view(allow_empty=True)),
|
2014-04-02 00:46:34 +00:00
|
|
|
url(r'^dates/booksignings/today/$',
|
2012-04-30 18:41:38 +00:00
|
|
|
views.BookSigningTodayArchive.as_view()),
|
2010-10-18 13:34:47 +00:00
|
|
|
|
|
|
|
# DateDetailView
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/(?P<day>[0-9]{1,2})/(?P<pk>[0-9]+)/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookDetail.as_view()),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[0-9]{1,2})/(?P<day>[0-9]{1,2})/(?P<pk>[0-9]+)/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookDetail.as_view(month_format='%m')),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/(?P<day>[0-9]{1,2})/(?P<pk>[0-9]+)/allow_future/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookDetail.as_view(allow_future=True)),
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/(?P<day>[0-9]{1,2})/nopk/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookDetail.as_view()),
|
|
|
|
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/(?P<day>[0-9]{1,2})/byslug/(?P<slug>[\w-]+)/$',
|
2010-10-18 13:34:47 +00:00
|
|
|
views.BookDetail.as_view()),
|
|
|
|
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/books/get_object_custom_queryset/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/(?P<day>[0-9]{1,2})/(?P<pk>[0-9]+)/$',
|
2011-10-13 13:38:38 +00:00
|
|
|
views.BookDetailGetObjectCustomQueryset.as_view()),
|
|
|
|
|
2014-04-14 18:12:44 +00:00
|
|
|
url(r'^dates/booksignings/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/(?P<day>[0-9]{1,2})/(?P<pk>[0-9]+)/$',
|
2012-04-30 18:41:38 +00:00
|
|
|
views.BookSigningDetail.as_view()),
|
|
|
|
|
2010-10-18 13:34:47 +00:00
|
|
|
# Useful for testing redirects
|
2014-08-12 14:54:42 +00:00
|
|
|
url(r'^accounts/login/$', auth_views.login)
|
2014-04-02 00:46:34 +00:00
|
|
|
]
|