Show More
@@ -1,80 +1,81 b'' | |||
|
1 | 1 | from django.conf.urls import patterns, url |
|
2 | from django.views.i18n import javascript_catalog | |
|
2 | 3 | |
|
3 | 4 | from boards import views |
|
4 | 5 | from boards.rss import AllThreadsFeed, TagThreadsFeed, ThreadPostsFeed |
|
5 | 6 | from boards.views import api, tag_threads, all_threads, \ |
|
6 | 7 | settings, all_tags |
|
7 | 8 | from boards.views.authors import AuthorsView |
|
8 | 9 | from boards.views.notifications import NotificationView |
|
9 | 10 | from boards.views.search import BoardSearchView |
|
10 | 11 | from boards.views.static import StaticPageView |
|
11 | 12 | from boards.views.preview import PostPreviewView |
|
12 | 13 | |
|
13 | 14 | |
|
14 | 15 | js_info_dict = { |
|
15 | 16 | 'packages': ('boards',), |
|
16 | 17 | } |
|
17 | 18 | |
|
18 | 19 | urlpatterns = patterns('', |
|
19 | 20 | # /boards/ |
|
20 | 21 | url(r'^$', all_threads.AllThreadsView.as_view(), name='index'), |
|
21 | 22 | # /boards/page/ |
|
22 | 23 | url(r'^page/(?P<page>\w+)/$', all_threads.AllThreadsView.as_view(), |
|
23 | 24 | name='index'), |
|
24 | 25 | |
|
25 | 26 | # /boards/tag/tag_name/ |
|
26 | 27 | url(r'^tag/(?P<tag_name>\w+)/$', tag_threads.TagView.as_view(), |
|
27 | 28 | name='tag'), |
|
28 | 29 | # /boards/tag/tag_id/page/ |
|
29 | 30 | url(r'^tag/(?P<tag_name>\w+)/page/(?P<page>\w+)/$', |
|
30 | 31 | tag_threads.TagView.as_view(), name='tag'), |
|
31 | 32 | |
|
32 | 33 | # /boards/thread/ |
|
33 | 34 | url(r'^thread/(?P<post_id>\d+)/$', views.thread.normal.NormalThreadView.as_view(), |
|
34 | 35 | name='thread'), |
|
35 | 36 | url(r'^thread/(?P<post_id>\d+)/mode/gallery/$', views.thread.gallery.GalleryThreadView.as_view(), |
|
36 | 37 | name='thread_gallery'), |
|
37 | 38 | |
|
38 | 39 | url(r'^settings/$', settings.SettingsView.as_view(), name='settings'), |
|
39 | 40 | url(r'^tags/(?P<query>\w+)?/?$', all_tags.AllTagsView.as_view(), name='tags'), |
|
40 | 41 | url(r'^authors/$', AuthorsView.as_view(), name='authors'), |
|
41 | 42 | |
|
42 | 43 | url(r'^banned/$', views.banned.BannedView.as_view(), name='banned'), |
|
43 | 44 | url(r'^staticpage/(?P<name>\w+)/$', StaticPageView.as_view(), |
|
44 | 45 | name='staticpage'), |
|
45 | 46 | |
|
46 | 47 | # RSS feeds |
|
47 | 48 | url(r'^rss/$', AllThreadsFeed()), |
|
48 | 49 | url(r'^page/(?P<page>\d+)/rss/$', AllThreadsFeed()), |
|
49 | 50 | url(r'^tag/(?P<tag_name>\w+)/rss/$', TagThreadsFeed()), |
|
50 | 51 | url(r'^tag/(?P<tag_name>\w+)/page/(?P<page>\w+)/rss/$', TagThreadsFeed()), |
|
51 | 52 | url(r'^thread/(?P<post_id>\d+)/rss/$', ThreadPostsFeed()), |
|
52 | 53 | |
|
53 | 54 | # i18n |
|
54 |
url(r'^jsi18n/$', |
|
|
55 | url(r'^jsi18n/$', javascript_catalog, js_info_dict, | |
|
55 | 56 | name='js_info_dict'), |
|
56 | 57 | |
|
57 | 58 | # API |
|
58 | 59 | url(r'^api/post/(?P<post_id>\d+)/$', api.get_post, name="get_post"), |
|
59 | 60 | url(r'^api/diff_thread$', |
|
60 | 61 | api.api_get_threaddiff, name="get_thread_diff"), |
|
61 | 62 | url(r'^api/threads/(?P<count>\w+)/$', api.api_get_threads, |
|
62 | 63 | name='get_threads'), |
|
63 | 64 | url(r'^api/tags/$', api.api_get_tags, name='get_tags'), |
|
64 | 65 | url(r'^api/thread/(?P<opening_post_id>\w+)/$', api.api_get_thread_posts, |
|
65 | 66 | name='get_thread'), |
|
66 | 67 | url(r'^api/add_post/(?P<opening_post_id>\w+)/$', api.api_add_post, |
|
67 | 68 | name='add_post'), |
|
68 | 69 | url(r'^api/notifications/(?P<username>\w+)/$', api.api_get_notifications, |
|
69 | 70 | name='api_notifications'), |
|
70 | 71 | |
|
71 | 72 | # Search |
|
72 | 73 | url(r'^search/$', BoardSearchView.as_view(), name='search'), |
|
73 | 74 | |
|
74 | 75 | # Notifications |
|
75 | 76 | url(r'^notifications/(?P<username>\w+)$', NotificationView.as_view(), name='notifications'), |
|
76 | 77 | |
|
77 | 78 | # Post preview |
|
78 | 79 | url(r'^preview/$', PostPreviewView.as_view(), name='preview') |
|
79 | 80 | |
|
80 | 81 | ) |
General Comments 0
You need to be logged in to leave comments.
Login now