##// END OF EJS Templates
Show header in the feed
Show header in the feed

File last commit:

r1741:58ced8b0 default
r1823:ce41b3a5 default
Show More
urls.py
97 lines | 3.9 KiB | text/x-python | PythonLexer
from django.conf.urls import url
import neboard
from boards import views
from boards.rss import AllThreadsFeed, TagThreadsFeed, ThreadPostsFeed
from boards.views import api, tag_threads, all_threads, \
settings, all_tags, feed, alias
from boards.views.authors import AuthorsView
from boards.views.notifications import NotificationView
from boards.views.static import StaticPageView
from boards.views.preview import PostPreviewView
from boards.views.sync import get_post_sync_data, response_get, response_list
from boards.views.random import RandomImageView
from boards.views.tag_gallery import TagGalleryView
from boards.views.translation import cached_javascript_catalog
from boards.views.search import BoardSearchView
from boards.views.landing import LandingView
js_info_dict = {
'packages': ('boards',),
}
urlpatterns = [
# /boards/
url(r'^all/$', all_threads.AllThreadsView.as_view(), name='index'),
# /boards/tag/tag_name/
url(r'^tag/(?P<tag_name>\w+)/$', tag_threads.TagView.as_view(),
name='tag'),
# /boards/thread/
url(r'^thread/(?P<post_id>\d+)/$', views.thread.NormalThreadView.as_view(),
name='thread'),
url(r'^thread/(?P<post_id>\d+)/mode/gallery/$', views.thread.GalleryThreadView.as_view(),
name='thread_gallery'),
url(r'^thread/(?P<post_id>\d+)/mode/tree/$', views.thread.TreeThreadView.as_view(),
name='thread_tree'),
# /feed/
url(r'^feed/$', views.feed.FeedView.as_view(), name='feed'),
url(r'^settings/$', settings.SettingsView.as_view(), name='settings'),
url(r'^aliases/(?P<category>\w+)/$', alias.AliasesView.as_view(), name='aliases'),
url(r'^tags/$', all_tags.AllTagsView.as_view(), name='tags'),
url(r'^authors/$', AuthorsView.as_view(), name='authors'),
url(r'^banned/$', views.banned.BannedView.as_view(), name='banned'),
url(r'^staticpage/(?P<name>\w+)/$', StaticPageView.as_view(),
name='staticpage'),
url(r'^random/$', RandomImageView.as_view(), name='random'),
url(r'^tag/(?P<tag_name>\w+)/gallery/$', TagGalleryView.as_view(), name='tag_gallery'),
url(r'^search/$', BoardSearchView.as_view(), name='search'),
url(r'^$', LandingView.as_view(), name='landing'),
# RSS feeds
url(r'^rss/$', AllThreadsFeed()),
url(r'^page/(?P<page>\d+)/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>\d+)/rss/$', ThreadPostsFeed()),
# i18n
url(r'^jsi18n/$', cached_javascript_catalog, js_info_dict,
name='js_info_dict'),
# API
url(r'^api/post/(?P<post_id>\d+)/$', api.get_post, name="get_post"),
url(r'^api/diff_thread/$', api.api_get_threaddiff, name="get_thread_diff"),
url(r'^api/threads/(?P<count>\w+)/$', api.api_get_threads,
name='get_threads'),
url(r'^api/tags/$', api.api_get_tags, name='get_tags'),
url(r'^api/thread/(?P<opening_post_id>\w+)/$', api.api_get_thread_posts,
name='get_thread'),
url(r'^api/add_post/(?P<opening_post_id>\w+)/$', api.api_add_post,
name='add_post'),
url(r'^api/notifications/(?P<username>\w+)/$', api.api_get_notifications,
name='api_notifications'),
url(r'^api/preview/$', api.api_get_preview, name='preview'),
url(r'^api/new_posts/$', api.api_get_new_posts, name='new_posts'),
url(r'^api/stickers/$', api.api_get_stickers, name='get_stickers'),
# Sync protocol API
url(r'^api/sync/list/$', response_list, name='api_sync_list'),
url(r'^api/sync/get/$', response_get, name='api_sync_get'),
# Notifications
url(r'^notifications/(?P<username>\w+)/$', NotificationView.as_view(), name='notifications'),
url(r'^notifications/$', NotificationView.as_view(), name='notifications'),
# Post preview
url(r'^preview/$', PostPreviewView.as_view(), name='preview'),
url(r'^post_xml/(?P<post_id>\d+)$', get_post_sync_data,
name='post_sync_data'),
]