-
Notifications
You must be signed in to change notification settings - Fork 1
/
urls.py
73 lines (66 loc) · 2.41 KB
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
from django.conf.urls import patterns, url, include
from django.contrib import admin
from comics.feeds import LatestComics
from comics.sitemap import ComicsSitemap
try:
from urls_local import urlpatterns as urlpatterns_local
except ImportError:
urlpatterns_local = patterns('')
admin.autodiscover()
feeds = {
'xkcd': LatestComics,
}
sitemaps = {
'comics': ComicsSitemap
}
urlpatterns = patterns(
'',
url(r'^admin/',
include(admin.site.urls, app_name='index')),
(r'^$', 'comics.views.last'),
(r'^num/$', 'comics.views.index_numbers'),
(r'^img/$', 'comics.views.index_thumbnail'),
(r'^(?P<comics_id>\d+)/$', 'comics.views.detail'),
(r'^(?P<comics_id>\d+)/(?P<timestamp>\d+)/$',
'comics.views.detail_unpublished'),
(r'^random/(?P<comics_id>\d+)/$', 'comics.views.random'),
(r'^random/$', 'comics.views.random'),
(r'^random/untranscribed/(?P<comics_id>\d+)/$',
'transcript.views.random'),
(r'^random/untranscribed/$', 'transcript.views.random'),
(r'^feeds/(?P<url>.*)/$',
'django.contrib.syndication.views.Feed', {'feed_dict': feeds}),
# For users.
(r'^login/$',
'django.contrib.auth.views.login',
{'template_name': 'login.html'}),
url(r'^logout/$',
'django.contrib.auth.views.logout',
{'next_page': '/'}, name='logout'),
(r'^unpublished/$',
'comics.views.index_unpublished'),
(r'^edit/(?P<comics_id>\d+)/$',
'comics.views.edit'),
(r'^publish/(?P<comics_id>\d+)/$',
'comics.views.publish'),
(r'^review/(?P<comics_id>\d+)/$',
'comics.views.review'),
(r'^add/$',
'comics.views.add'),
(r'^profile/$',
'profile.views.edit'),
(r'^livejournal/(?P<comics_id>\d+)/$', 'livejournal.views.post'),
# Transcriptions.
(r'^transcript_form/(?P<comics_id>\d+)/$', 'transcript.views.show_form'),
(r'^transcript_save/(?P<comics_id>\d+)/$', 'transcript.views.add'),
(r'^transcript_thanks/(?P<comics_id>\d+)/$', 'transcript.views.thanks'),
(r'^transcript_edit/(?P<comics_id>\d+)/$', 'transcript.views.edit'),
(r'^transcript_clear/(?P<comics_id>\d+)/$',
'transcript.views.clear_unapproved'),
(r'^unapproved/$', 'transcript.views.list_unapproved'),
(r'^statistics/$', 'statistics.views.show'),
# Sitemaps.
(r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap',
{'sitemaps': sitemaps}),
) + urlpatterns_local
handler404 = 'comics.views.custom404'