urls.py
36 lines
| 1.4 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
|
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 | |||
url(r'^login$', views.login, name='login'), | |||
Ilyas
|
r13 | # logout page | |
url(r'^logout$', views.logout, name='logout'), | |||
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'), | |||
# /boards/thread/ | |||
neko259
|
r35 | url(r'^thread/(?P<post_id>\w+)/$', views.thread, name='thread'), | |
# /boards/theme/theme_name/ | |||
url(r'^settings$', views.settings, name='settings'), | |||
neko259
|
r57 | 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
|
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
|
r81 | ) |