|
@@ -23,27 +23,27 @@ urlpatterns = [
|
|
|
# DetailView
|
|
|
url(r'^detail/obj/$',
|
|
|
views.ObjectDetail.as_view()),
|
|
|
- url(r'^detail/artist/(?P<pk>\d+)/$',
|
|
|
+ url(r'^detail/artist/(?P<pk>[0-9]+)/$',
|
|
|
views.ArtistDetail.as_view(),
|
|
|
name="artist_detail"),
|
|
|
- url(r'^detail/author/(?P<pk>\d+)/$',
|
|
|
+ url(r'^detail/author/(?P<pk>[0-9]+)/$',
|
|
|
views.AuthorDetail.as_view(),
|
|
|
name="author_detail"),
|
|
|
- url(r'^detail/author/bycustompk/(?P<foo>\d+)/$',
|
|
|
+ url(r'^detail/author/bycustompk/(?P<foo>[0-9]+)/$',
|
|
|
views.AuthorDetail.as_view(pk_url_kwarg='foo')),
|
|
|
url(r'^detail/author/byslug/(?P<slug>[\w-]+)/$',
|
|
|
views.AuthorDetail.as_view()),
|
|
|
url(r'^detail/author/bycustomslug/(?P<foo>[\w-]+)/$',
|
|
|
views.AuthorDetail.as_view(slug_url_kwarg='foo')),
|
|
|
- url(r'^detail/author/(?P<pk>\d+)/template_name_suffix/$',
|
|
|
+ url(r'^detail/author/(?P<pk>[0-9]+)/template_name_suffix/$',
|
|
|
views.AuthorDetail.as_view(template_name_suffix='_view')),
|
|
|
- url(r'^detail/author/(?P<pk>\d+)/template_name/$',
|
|
|
+ url(r'^detail/author/(?P<pk>[0-9]+)/template_name/$',
|
|
|
views.AuthorDetail.as_view(template_name='generic_views/about.html')),
|
|
|
- url(r'^detail/author/(?P<pk>\d+)/context_object_name/$',
|
|
|
+ url(r'^detail/author/(?P<pk>[0-9]+)/context_object_name/$',
|
|
|
views.AuthorDetail.as_view(context_object_name='thingy')),
|
|
|
- url(r'^detail/author/(?P<pk>\d+)/dupe_context_object_name/$',
|
|
|
+ url(r'^detail/author/(?P<pk>[0-9]+)/dupe_context_object_name/$',
|
|
|
views.AuthorDetail.as_view(context_object_name='object')),
|
|
|
- url(r'^detail/page/(?P<pk>\d+)/field/$',
|
|
|
+ url(r'^detail/page/(?P<pk>[0-9]+)/field/$',
|
|
|
views.PageDetail.as_view()),
|
|
|
url(r'^detail/author/invalid/url/$',
|
|
|
views.AuthorDetail.as_view()),
|
|
@@ -51,7 +51,7 @@ urlpatterns = [
|
|
|
views.AuthorDetail.as_view(queryset=None)),
|
|
|
url(r'^detail/nonmodel/1/$',
|
|
|
views.NonModelDetail.as_view()),
|
|
|
- url(r'^detail/doesnotexist/(?P<pk>\d+)/$',
|
|
|
+ url(r'^detail/doesnotexist/(?P<pk>[0-9]+)/$',
|
|
|
views.ObjectDoesNotExistDetail.as_view()),
|
|
|
# FormView
|
|
|
url(r'^contact/$',
|
|
@@ -60,7 +60,7 @@ urlpatterns = [
|
|
|
# Create/UpdateView
|
|
|
url(r'^edit/artists/create/$',
|
|
|
views.ArtistCreate.as_view()),
|
|
|
- url(r'^edit/artists/(?P<pk>\d+)/update/$',
|
|
|
+ url(r'^edit/artists/(?P<pk>[0-9]+)/update/$',
|
|
|
views.ArtistUpdate.as_view()),
|
|
|
|
|
|
url(r'^edit/authors/create/naive/$',
|
|
@@ -76,27 +76,27 @@ urlpatterns = [
|
|
|
url(r'^edit/authors/create/special/$',
|
|
|
views.SpecializedAuthorCreate.as_view()),
|
|
|
|
|
|
- url(r'^edit/author/(?P<pk>\d+)/update/naive/$',
|
|
|
+ url(r'^edit/author/(?P<pk>[0-9]+)/update/naive/$',
|
|
|
views.NaiveAuthorUpdate.as_view()),
|
|
|
- url(r'^edit/author/(?P<pk>\d+)/update/redirect/$',
|
|
|
+ url(r'^edit/author/(?P<pk>[0-9]+)/update/redirect/$',
|
|
|
views.NaiveAuthorUpdate.as_view(success_url='/edit/authors/create/')),
|
|
|
- url(r'^edit/author/(?P<pk>\d+)/update/interpolate_redirect/$',
|
|
|
+ url(r'^edit/author/(?P<pk>[0-9]+)/update/interpolate_redirect/$',
|
|
|
views.NaiveAuthorUpdate.as_view(success_url='/edit/author/%(id)d/update/')),
|
|
|
- url(r'^edit/author/(?P<pk>\d+)/update/$',
|
|
|
+ url(r'^edit/author/(?P<pk>[0-9]+)/update/$',
|
|
|
views.AuthorUpdate.as_view()),
|
|
|
url(r'^edit/author/update/$',
|
|
|
views.OneAuthorUpdate.as_view()),
|
|
|
- url(r'^edit/author/(?P<pk>\d+)/update/special/$',
|
|
|
+ url(r'^edit/author/(?P<pk>[0-9]+)/update/special/$',
|
|
|
views.SpecializedAuthorUpdate.as_view()),
|
|
|
- url(r'^edit/author/(?P<pk>\d+)/delete/naive/$',
|
|
|
+ url(r'^edit/author/(?P<pk>[0-9]+)/delete/naive/$',
|
|
|
views.NaiveAuthorDelete.as_view()),
|
|
|
- url(r'^edit/author/(?P<pk>\d+)/delete/redirect/$',
|
|
|
+ url(r'^edit/author/(?P<pk>[0-9]+)/delete/redirect/$',
|
|
|
views.NaiveAuthorDelete.as_view(success_url='/edit/authors/create/')),
|
|
|
- url(r'^edit/author/(?P<pk>\d+)/delete/interpolate_redirect/$',
|
|
|
+ url(r'^edit/author/(?P<pk>[0-9]+)/delete/interpolate_redirect/$',
|
|
|
views.NaiveAuthorDelete.as_view(success_url='/edit/authors/create/?deleted=%(id)s')),
|
|
|
- url(r'^edit/author/(?P<pk>\d+)/delete/$',
|
|
|
+ url(r'^edit/author/(?P<pk>[0-9]+)/delete/$',
|
|
|
views.AuthorDelete.as_view()),
|
|
|
- url(r'^edit/author/(?P<pk>\d+)/delete/special/$',
|
|
|
+ url(r'^edit/author/(?P<pk>[0-9]+)/delete/special/$',
|
|
|
views.SpecializedAuthorDelete.as_view()),
|
|
|
|
|
|
# ArchiveIndexView
|
|
@@ -134,7 +134,7 @@ urlpatterns = [
|
|
|
name="authors_list"),
|
|
|
url(r'^list/authors/paginated/$',
|
|
|
views.AuthorList.as_view(paginate_by=30)),
|
|
|
- url(r'^list/authors/paginated/(?P<page>\d+)/$',
|
|
|
+ url(r'^list/authors/paginated/(?P<page>[0-9]+)/$',
|
|
|
views.AuthorList.as_view(paginate_by=30)),
|
|
|
url(r'^list/authors/paginated-orphaned/$',
|
|
|
views.AuthorList.as_view(paginate_by=30, paginate_orphans=2)),
|
|
@@ -162,71 +162,71 @@ urlpatterns = [
|
|
|
# YearArchiveView
|
|
|
# Mixing keyword and positional captures below is intentional; the views
|
|
|
# ought to be able to accept either.
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/$',
|
|
|
views.BookYearArchive.as_view()),
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/make_object_list/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/make_object_list/$',
|
|
|
views.BookYearArchive.as_view(make_object_list=True)),
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/allow_empty/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/allow_empty/$',
|
|
|
views.BookYearArchive.as_view(allow_empty=True)),
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/allow_future/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/allow_future/$',
|
|
|
views.BookYearArchive.as_view(allow_future=True)),
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/paginated/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/paginated/$',
|
|
|
views.BookYearArchive.as_view(make_object_list=True, paginate_by=30)),
|
|
|
url(r'^dates/books/no_year/$',
|
|
|
views.BookYearArchive.as_view()),
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/reverse/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/reverse/$',
|
|
|
views.BookYearArchive.as_view(queryset=models.Book.objects.order_by('pubdate'))),
|
|
|
- url(r'^dates/booksignings/(?P<year>\d{4})/$',
|
|
|
+ url(r'^dates/booksignings/(?P<year>[0-9]{4})/$',
|
|
|
views.BookSigningYearArchive.as_view()),
|
|
|
|
|
|
# MonthArchiveView
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/(?P<month>[a-z]{3})/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/$',
|
|
|
views.BookMonthArchive.as_view()),
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/(?P<month>\d{1,2})/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[0-9]{1,2})/$',
|
|
|
views.BookMonthArchive.as_view(month_format='%m')),
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/(?P<month>[a-z]{3})/allow_empty/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/allow_empty/$',
|
|
|
views.BookMonthArchive.as_view(allow_empty=True)),
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/(?P<month>[a-z]{3})/allow_future/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/allow_future/$',
|
|
|
views.BookMonthArchive.as_view(allow_future=True)),
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/(?P<month>[a-z]{3})/paginated/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/paginated/$',
|
|
|
views.BookMonthArchive.as_view(paginate_by=30)),
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/no_month/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/no_month/$',
|
|
|
views.BookMonthArchive.as_view()),
|
|
|
- url(r'^dates/booksignings/(?P<year>\d{4})/(?P<month>[a-z]{3})/$',
|
|
|
+ url(r'^dates/booksignings/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/$',
|
|
|
views.BookSigningMonthArchive.as_view()),
|
|
|
|
|
|
# WeekArchiveView
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/week/(?P<week>\d{1,2})/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/week/(?P<week>[0-9]{1,2})/$',
|
|
|
views.BookWeekArchive.as_view()),
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/week/(?P<week>\d{1,2})/allow_empty/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/week/(?P<week>[0-9]{1,2})/allow_empty/$',
|
|
|
views.BookWeekArchive.as_view(allow_empty=True)),
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/week/(?P<week>\d{1,2})/allow_future/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/week/(?P<week>[0-9]{1,2})/allow_future/$',
|
|
|
views.BookWeekArchive.as_view(allow_future=True)),
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/week/(?P<week>\d{1,2})/paginated/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/week/(?P<week>[0-9]{1,2})/paginated/$',
|
|
|
views.BookWeekArchive.as_view(paginate_by=30)),
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/week/no_week/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/week/no_week/$',
|
|
|
views.BookWeekArchive.as_view()),
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/week/(?P<week>\d{1,2})/monday/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/week/(?P<week>[0-9]{1,2})/monday/$',
|
|
|
views.BookWeekArchive.as_view(week_format='%W')),
|
|
|
- url(r'^dates/booksignings/(?P<year>\d{4})/week/(?P<week>\d{1,2})/$',
|
|
|
+ url(r'^dates/booksignings/(?P<year>[0-9]{4})/week/(?P<week>[0-9]{1,2})/$',
|
|
|
views.BookSigningWeekArchive.as_view()),
|
|
|
|
|
|
# DayArchiveView
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\d{1,2})/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/(?P<day>[0-9]{1,2})/$',
|
|
|
views.BookDayArchive.as_view()),
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[0-9]{1,2})/(?P<day>[0-9]{1,2})/$',
|
|
|
views.BookDayArchive.as_view(month_format='%m')),
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\d{1,2})/allow_empty/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/(?P<day>[0-9]{1,2})/allow_empty/$',
|
|
|
views.BookDayArchive.as_view(allow_empty=True)),
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\d{1,2})/allow_future/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/(?P<day>[0-9]{1,2})/allow_future/$',
|
|
|
views.BookDayArchive.as_view(allow_future=True)),
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\d{1,2})/allow_empty_and_future/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/(?P<day>[0-9]{1,2})/allow_empty_and_future/$',
|
|
|
views.BookDayArchive.as_view(allow_empty=True, allow_future=True)),
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\d{1,2})/paginated/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/(?P<day>[0-9]{1,2})/paginated/$',
|
|
|
views.BookDayArchive.as_view(paginate_by=True)),
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/(?P<month>[a-z]{3})/no_day/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/no_day/$',
|
|
|
views.BookDayArchive.as_view()),
|
|
|
- url(r'^dates/booksignings/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\d{1,2})/$',
|
|
|
+ url(r'^dates/booksignings/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/(?P<day>[0-9]{1,2})/$',
|
|
|
views.BookSigningDayArchive.as_view()),
|
|
|
|
|
|
# TodayArchiveView
|
|
@@ -238,22 +238,22 @@ urlpatterns = [
|
|
|
views.BookSigningTodayArchive.as_view()),
|
|
|
|
|
|
# DateDetailView
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\d{1,2})/(?P<pk>\d+)/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/(?P<day>[0-9]{1,2})/(?P<pk>[0-9]+)/$',
|
|
|
views.BookDetail.as_view()),
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<pk>\d+)/$',
|
|
|
+ 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]+)/$',
|
|
|
views.BookDetail.as_view(month_format='%m')),
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\d{1,2})/(?P<pk>\d+)/allow_future/$',
|
|
|
+ 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/$',
|
|
|
views.BookDetail.as_view(allow_future=True)),
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\d{1,2})/nopk/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/(?P<day>[0-9]{1,2})/nopk/$',
|
|
|
views.BookDetail.as_view()),
|
|
|
|
|
|
- url(r'^dates/books/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\d{1,2})/byslug/(?P<slug>[\w-]+)/$',
|
|
|
+ url(r'^dates/books/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/(?P<day>[0-9]{1,2})/byslug/(?P<slug>[\w-]+)/$',
|
|
|
views.BookDetail.as_view()),
|
|
|
|
|
|
- url(r'^dates/books/get_object_custom_queryset/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\d{1,2})/(?P<pk>\d+)/$',
|
|
|
+ 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]+)/$',
|
|
|
views.BookDetailGetObjectCustomQueryset.as_view()),
|
|
|
|
|
|
- url(r'^dates/booksignings/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\d{1,2})/(?P<pk>\d+)/$',
|
|
|
+ url(r'^dates/booksignings/(?P<year>[0-9]{4})/(?P<month>[a-z]{3})/(?P<day>[0-9]{1,2})/(?P<pk>[0-9]+)/$',
|
|
|
views.BookSigningDetail.as_view()),
|
|
|
|
|
|
# Useful for testing redirects
|