Show More
@@ -1,90 +1,90 b'' | |||
|
1 | 1 | from django.conf.urls import url |
|
2 | 2 | from django.urls import path |
|
3 | 3 | from django.views.i18n import JavaScriptCatalog |
|
4 | 4 | |
|
5 | 5 | from boards import views |
|
6 | 6 | from boards.rss import AllThreadsFeed, TagThreadsFeed, ThreadPostsFeed |
|
7 | 7 | from boards.views import api, tag_threads, all_threads, settings, feed, stickers |
|
8 | 8 | from boards.views.authors import AuthorsView |
|
9 | 9 | from boards.views.landing import LandingView |
|
10 | 10 | from boards.views.notifications import NotificationView |
|
11 | 11 | from boards.views.preview import PostPreviewView |
|
12 | 12 | from boards.views.random import RandomImageView |
|
13 | 13 | from boards.views.search import BoardSearchView |
|
14 | 14 | from boards.views.static import StaticPageView |
|
15 | 15 | from boards.views.sync import get_post_sync_data, response_get, response_list |
|
16 | 16 | from boards.views.tag_gallery import TagGalleryView |
|
17 | 17 | from boards.views.utils import UtilsView |
|
18 | 18 | |
|
19 | 19 | |
|
20 | 20 | urlpatterns = [ |
|
21 | 21 | # /boards/ |
|
22 | 22 | path('all/', all_threads.AllThreadsView.as_view(), name='index'), |
|
23 | 23 | |
|
24 | 24 | # /boards/tag/tag_name/ |
|
25 | url(r'^tag/(?P<tag_name>[\w\d\']+)/', tag_threads.TagView.as_view(), | |
|
25 | url(r'^tag/(?P<tag_name>[\w\d\']+)/$', tag_threads.TagView.as_view(), | |
|
26 | 26 | name='tag'), |
|
27 | 27 | url(r'^tag/(?P<tag_name>[\w\d\']+)/gallery/$', TagGalleryView.as_view(), name='tag_gallery'), |
|
28 | 28 | |
|
29 | 29 | # /boards/thread/ |
|
30 | 30 | path('thread/<int:post_id>/', views.thread.NormalThreadView.as_view(), |
|
31 | 31 | name='thread'), |
|
32 | 32 | path('thread/<int:post_id>/mode/gallery/', views.thread.GalleryThreadView.as_view(), |
|
33 | 33 | name='thread_gallery'), |
|
34 | 34 | path('thread/<int:post_id>/mode/tree/', views.thread.TreeThreadView.as_view(), |
|
35 | 35 | name='thread_tree'), |
|
36 | 36 | # /feed/ |
|
37 | 37 | path('feed/', views.feed.FeedView.as_view(), name='feed'), |
|
38 | 38 | |
|
39 | 39 | path('settings/', settings.SettingsView.as_view(), name='settings'), |
|
40 | 40 | path('stickers/', stickers.AliasesView.as_view(), name='stickers'), |
|
41 | 41 | path('stickers/<str:category>/', stickers.AliasesView.as_view(), name='stickers'), |
|
42 | 42 | path('authors/', AuthorsView.as_view(), name='authors'), |
|
43 | 43 | |
|
44 | 44 | path('banned/', views.banned.BannedView.as_view(), name='banned'), |
|
45 | 45 | path('staticpage/<str:name>/', StaticPageView.as_view(), name='staticpage'), |
|
46 | 46 | |
|
47 | 47 | path('random/', RandomImageView.as_view(), name='random'), |
|
48 | 48 | path('search/', BoardSearchView.as_view(), name='search'), |
|
49 | 49 | path('', LandingView.as_view(), name='landing'), |
|
50 | 50 | path('utils', UtilsView.as_view(), name='utils'), |
|
51 | 51 | |
|
52 | 52 | # RSS feeds |
|
53 | 53 | path('rss/', AllThreadsFeed()), |
|
54 | 54 | path('all/rss/', AllThreadsFeed()), |
|
55 | 55 | url(r'^tag/(?P<tag_name>\w+)/rss/$', TagThreadsFeed()), |
|
56 | 56 | path('thread/<int:post_id>/rss/', ThreadPostsFeed()), |
|
57 | 57 | |
|
58 | 58 | # i18n |
|
59 | 59 | path('jsi18n/', JavaScriptCatalog.as_view(packages=['boards']), name='js_info_dict'), |
|
60 | 60 | |
|
61 | 61 | # API |
|
62 | 62 | url(r'^api/post/(?P<post_id>\d+)/$', api.get_post, name="get_post"), |
|
63 | 63 | url(r'^api/diff_thread/$', api.api_get_threaddiff, name="get_thread_diff"), |
|
64 | 64 | url(r'^api/threads/(?P<count>\w+)/$', api.api_get_threads, |
|
65 | 65 | name='get_threads'), |
|
66 | 66 | url(r'^api/tags/$', api.api_get_tags, name='get_tags'), |
|
67 | 67 | url(r'^api/thread/(?P<opening_post_id>\w+)/$', api.api_get_thread_posts, |
|
68 | 68 | name='get_thread'), |
|
69 | 69 | url(r'^api/add_post/(?P<opening_post_id>\w+)/$', api.api_add_post, |
|
70 | 70 | name='add_post'), |
|
71 | 71 | url(r'^api/notifications/(?P<username>\w+)/$', api.api_get_notifications, |
|
72 | 72 | name='api_notifications'), |
|
73 | 73 | url(r'^api/preview/$', api.api_get_preview, name='preview'), |
|
74 | 74 | url(r'^api/new_posts/$', api.api_get_new_posts, name='new_posts'), |
|
75 | 75 | url(r'^api/stickers/$', api.api_get_stickers, name='get_stickers'), |
|
76 | 76 | |
|
77 | 77 | # Sync protocol API |
|
78 | 78 | url(r'^api/sync/list/$', response_list, name='api_sync_list'), |
|
79 | 79 | url(r'^api/sync/get/$', response_get, name='api_sync_get'), |
|
80 | 80 | |
|
81 | 81 | # Notifications |
|
82 | 82 | path('notifications/<str:username>/', NotificationView.as_view(), name='notifications'), |
|
83 | 83 | path('notifications/', NotificationView.as_view(), name='notifications'), |
|
84 | 84 | |
|
85 | 85 | # Post preview |
|
86 | 86 | path('preview/', PostPreviewView.as_view(), name='preview'), |
|
87 | 87 | path('post_xml/<int:post_id>', get_post_sync_data, |
|
88 | 88 | name='post_sync_data'), |
|
89 | 89 | ] |
|
90 | 90 |
General Comments 0
You need to be logged in to leave comments.
Login now