urls.py
59 lines
| 2.2 KiB
| text/x-python
|
PythonLexer
/ boards / urls.py
Ilyas
|
r78 | from django.conf.urls import patterns, url, include | ||
neko259
|
r0 | from boards import views | ||
neko259
|
r89 | from boards.rss import AllThreadsFeed, TagThreadsFeed, ThreadPostsFeed | ||
neko259
|
r450 | from boards.views.api import api_get_threaddiff | ||
neko259
|
r0 | |||
neko259
|
r122 | js_info_dict = { | ||
'packages': ('boards',), | ||||
} | ||||
neko259
|
r0 | urlpatterns = patterns('', | ||
Ilyas
|
r9 | |||
neko259
|
r0 | # /boards/ | ||
neko259
|
r46 | url(r'^$', views.index, name='index'), | ||
# /boards/page/ | ||||
url(r'^page/(?P<page>\w+)/$', views.index, name='index'), | ||||
Ilyas
|
r9 | |||
# login page | ||||
neko259
|
r144 | url(r'^login/$', views.login, name='login'), | ||
Ilyas
|
r9 | |||
neko259
|
r46 | # /boards/tag/tag_name/ | ||
neko259
|
r35 | url(r'^tag/(?P<tag_name>\w+)/$', views.tag, name='tag'), | ||
neko259
|
r46 | # /boards/tag/tag_id/page/ | ||
url(r'^tag/(?P<tag_name>\w+)/page/(?P<page>\w+)/$', views.tag, name='tag'), | ||||
neko259
|
r145 | |||
# /boards/tag/tag_name/unsubscribe/ | ||||
url(r'^tag/(?P<tag_name>\w+)/subscribe/$', views.tag_subscribe, | ||||
name='tag_subscribe'), | ||||
# /boards/tag/tag_name/unsubscribe/ | ||||
url(r'^tag/(?P<tag_name>\w+)/unsubscribe/$', views.tag_unsubscribe, | ||||
name='tag_unsubscribe'), | ||||
neko259
|
r46 | # /boards/thread/ | ||
neko259
|
r35 | url(r'^thread/(?P<post_id>\w+)/$', views.thread, name='thread'), | ||
neko259
|
r144 | url(r'^settings/$', views.settings, name='settings'), | ||
url(r'^tags/$', views.all_tags, name='tags'), | ||||
Ilyas
|
r78 | url(r'^captcha/', include('captcha.urls')), | ||
neko259
|
r103 | url(r'^jump/(?P<post_id>\w+)/$', views.jump_to_post, name='jumper'), | ||
url(r'^authors/$', views.authors, name='authors'), | ||||
neko259
|
r112 | url(r'^delete/(?P<post_id>\w+)/$', views.delete, name='delete'), | ||
neko259
|
r156 | url(r'^ban/(?P<post_id>\w+)/$', views.ban, name='ban'), | ||
neko259
|
r116 | url(r'^banned/$', views.you_are_banned, name='banned'), | ||
neko259
|
r152 | url(r'^staticpage/(?P<name>\w+)/$', views.static_page, name='staticpage'), | ||
neko259
|
r89 | |||
# RSS feeds | ||||
url(r'^rss/$', AllThreadsFeed()), | ||||
neko259
|
r91 | url(r'^page/(?P<page>\w+)/rss/$', AllThreadsFeed()), | ||
neko259
|
r89 | url(r'^tag/(?P<tag_name>\w+)/rss/$', TagThreadsFeed()), | ||
neko259
|
r91 | url(r'^tag/(?P<tag_name>\w+)/page/(?P<page>\w+)/rss/$', TagThreadsFeed()), | ||
neko259
|
r89 | url(r'^thread/(?P<post_id>\w+)/rss/$', ThreadPostsFeed()), | ||
neko259
|
r122 | |||
neko259
|
r221 | # i18n | ||
neko259
|
r423 | url(r'^jsi18n/$', 'boards.views.cached_js_catalog', js_info_dict, name='js_info_dict'), | ||
neko259
|
r221 | |||
# API | ||||
neko259
|
r354 | url(r'^api/post/(?P<post_id>\w+)/$', views.get_post, name="get_post"), | ||
neko259
|
r363 | url(r'^api/diff_thread/(?P<thread_id>\w+)/(?P<last_update_time>\w+)/$', | ||
neko259
|
r450 | api_get_threaddiff, name="get_thread_diff"), | ||
neko259
|
r137 | ) | ||