urls.py
31 lines
| 1.1 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
|
r89 | ||
# RSS feeds | |||
url(r'^rss/$', AllThreadsFeed()), | |||
url(r'^tag/(?P<tag_name>\w+)/rss/$', TagThreadsFeed()), | |||
url(r'^thread/(?P<post_id>\w+)/rss/$', ThreadPostsFeed()), | |||
neko259
|
r81 | ) |