##// END OF EJS Templates
Refactored code. Added thread title if the opening post has no title.
Refactored code. Added thread title if the opening post has no title.

File last commit:

r145:713a01fa 1.1
r147:b7ff6a14 default
Show More
urls.py
50 lines | 1.8 KiB | text/x-python | PythonLexer
from django.conf.urls import patterns, url, include
from boards import views
from boards.rss import AllThreadsFeed, TagThreadsFeed, ThreadPostsFeed
js_info_dict = {
'packages': ('boards',),
}
urlpatterns = patterns('',
# /boards/
url(r'^$', views.index, name='index'),
# /boards/page/
url(r'^page/(?P<page>\w+)/$', views.index, name='index'),
# login page
url(r'^login/$', views.login, name='login'),
# /boards/tag/tag_name/
url(r'^tag/(?P<tag_name>\w+)/$', views.tag, name='tag'),
# /boards/tag/tag_id/page/
url(r'^tag/(?P<tag_name>\w+)/page/(?P<page>\w+)/$', views.tag, name='tag'),
# /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'),
# /boards/thread/
url(r'^thread/(?P<post_id>\w+)/$', views.thread, name='thread'),
# /boards/theme/theme_name/
url(r'^settings/$', views.settings, name='settings'),
url(r'^tags/$', views.all_tags, name='tags'),
url(r'^captcha/', include('captcha.urls')),
url(r'^jump/(?P<post_id>\w+)/$', views.jump_to_post, name='jumper'),
url(r'^authors/$', views.authors, name='authors'),
url(r'^delete/(?P<post_id>\w+)/$', views.delete, name='delete'),
url(r'^banned/$', views.you_are_banned, name='banned'),
# RSS feeds
url(r'^rss/$', AllThreadsFeed()),
url(r'^page/(?P<page>\w+)/rss/$', AllThreadsFeed()),
url(r'^tag/(?P<tag_name>\w+)/rss/$', TagThreadsFeed()),
url(r'^tag/(?P<tag_name>\w+)/page/(?P<page>\w+)/rss/$', TagThreadsFeed()),
url(r'^thread/(?P<post_id>\w+)/rss/$', ThreadPostsFeed()),
url(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),
)