Mercurial > public > sg101
comparison forums/urls.py @ 1028:5ba2508939f7
Django 1.8 changes; first batch.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 15 Dec 2015 21:01:07 -0600 |
parents | ee87ea74d46b |
children |
comparison
equal
deleted
inserted
replaced
1027:cd4db27c90e3 | 1028:5ba2508939f7 |
---|---|
1 """ | 1 """ |
2 URLs for the forums application. | 2 URLs for the forums application. |
3 """ | 3 """ |
4 from django.conf.urls import patterns, url | 4 from django.conf.urls import url |
5 | 5 |
6 urlpatterns = patterns('forums.views.main', | 6 import forums.views.attachments as attachments |
7 url(r'^$', 'index', name='forums-index'), | 7 import forums.views.favorites as favorites |
8 url(r'^catchup/$', 'catchup_all', name='forums-catchup_all'), | 8 import forums.views.main as main |
9 url(r'^new-topic-success/(?P<tid>\d+)$', 'new_topic_thanks', name='forums-new_topic_thanks'), | 9 import forums.views.spam as spam |
10 url(r'^topic/(?P<id>\d+)/$', 'topic_index', name='forums-topic_index'), | 10 import forums.views.subscriptions as subscriptions |
11 url(r'^topic/(?P<id>\d+)/unread/$', 'topic_unread', name='forums-topic_unread'), | |
12 url(r'^topic/(?P<id>\d+)/latest/$', 'topic_latest', name='forums-topic_latest'), | |
13 url(r'^topic/active/(\d+)/$', 'active_topics', name='forums-active_topics'), | |
14 url(r'^delete-post/$', 'delete_post', name='forums-delete_post'), | |
15 url(r'^edit/(?P<id>\d+)/$', 'edit_post', name='forums-edit_post'), | |
16 url(r'^flag-post/$', 'flag_post', name='forums-flag_post'), | |
17 url(r'^forum/(?P<slug>[\w\d-]+)/$', 'forum_index', name='forums-forum_index'), | |
18 url(r'^forum/(?P<slug>[\w\d-]+)/catchup/$', 'forum_catchup', name='forums-catchup'), | |
19 url(r'^forum/(?P<slug>[\w\d-]+)/new-topic/$', 'new_topic', name='forums-new_topic'), | |
20 url(r'^mod/forum/(?P<slug>[\w\d-]+)/$', 'mod_forum', name='forums-mod_forum'), | |
21 url(r'^mod/topic/delete/(\d+)/$', 'mod_topic_delete', name='forums-mod_topic_delete'), | |
22 url(r'^mod/topic/lock/(\d+)/$', 'mod_topic_lock', name='forums-mod_topic_lock'), | |
23 url(r'^mod/topic/move/(\d+)/$', 'mod_topic_move', name='forums-mod_topic_move'), | |
24 url(r'^mod/topic/split/(\d+)/$', 'mod_topic_split', name='forums-mod_topic_split'), | |
25 url(r'^mod/topic/stick/(\d+)/$', 'mod_topic_stick', name='forums-mod_topic_stick'), | |
26 url(r'^my-posts/$', 'my_posts', name='forums-my_posts'), | |
27 url(r'^post/(\d+)/$', 'goto_post', name='forums-goto_post'), | |
28 url(r'^post/ip/(\d+)/$', 'post_ip_info', name='forums-post_ip_info'), | |
29 url(r'^post/new/(?P<topic_id>\d+)/$', 'new_post', name='forums-new_post'), | |
30 url(r'^posts/(?P<username>[\w.@+-]{1,30})/$', 'posts_for_user', name='forums-posts_for_user'), | |
31 url(r'^quick-reply/$', 'quick_reply_ajax', name='forums-quick_reply'), | |
32 url(r'^unanswered/$', 'unanswered_topics', name='forums-unanswered_topics'), | |
33 url(r'^unread/$', 'unread_topics', name='forums-unread_topics'), | |
34 ) | |
35 | 11 |
36 urlpatterns += patterns('forums.views.favorites', | |
37 url(r'^favorite/(\d+)/$', 'favorite_topic', name='forums-favorite_topic'), | |
38 url(r'^favorites/$', 'manage_favorites', name='forums-manage_favorites'), | |
39 url(r'^favorites/(\d+)/$', 'favorites_status', name='forums-favorites_status'), | |
40 url(r'^unfavorite/(\d+)/$', 'unfavorite_topic', name='forums-unfavorite_topic'), | |
41 ) | |
42 | 12 |
43 urlpatterns += patterns('forums.views.subscriptions', | 13 urlpatterns = [ |
44 url(r'^subscribe/(\d+)/$', 'subscribe_topic', name='forums-subscribe_topic'), | 14 url(r'^$', main.index, name='forums-index'), |
45 url(r'^subscriptions/$', 'manage_subscriptions', name='forums-manage_subscriptions'), | 15 url(r'^catchup/$', main.catchup_all, name='forums-catchup_all'), |
46 url(r'^subscriptions/(\d+)/$', 'subscription_status', name='forums-subscription_status'), | 16 url(r'^new-topic-success/(?P<tid>\d+)$', main.new_topic_thanks, name='forums-new_topic_thanks'), |
47 url(r'^unsubscribe/(\d+)/$', 'unsubscribe_topic', name='forums-unsubscribe_topic'), | 17 url(r'^topic/(?P<id>\d+)/$', main.topic_index, name='forums-topic_index'), |
48 ) | 18 url(r'^topic/(?P<id>\d+)/unread/$', main.topic_unread, name='forums-topic_unread'), |
19 url(r'^topic/(?P<id>\d+)/latest/$', main.topic_latest, name='forums-topic_latest'), | |
20 url(r'^topic/active/(\d+)/$', main.active_topics, name='forums-active_topics'), | |
21 url(r'^delete-post/$', main.delete_post, name='forums-delete_post'), | |
22 url(r'^edit/(?P<id>\d+)/$', main.edit_post, name='forums-edit_post'), | |
23 url(r'^flag-post/$', main.flag_post, name='forums-flag_post'), | |
24 url(r'^forum/(?P<slug>[\w\d-]+)/$', main.forum_index, name='forums-forum_index'), | |
25 url(r'^forum/(?P<slug>[\w\d-]+)/catchup/$', main.forum_catchup, name='forums-catchup'), | |
26 url(r'^forum/(?P<slug>[\w\d-]+)/new-topic/$', main.new_topic, name='forums-new_topic'), | |
27 url(r'^mod/forum/(?P<slug>[\w\d-]+)/$', main.mod_forum, name='forums-mod_forum'), | |
28 url(r'^mod/topic/delete/(\d+)/$', main.mod_topic_delete, name='forums-mod_topic_delete'), | |
29 url(r'^mod/topic/lock/(\d+)/$', main.mod_topic_lock, name='forums-mod_topic_lock'), | |
30 url(r'^mod/topic/move/(\d+)/$', main.mod_topic_move, name='forums-mod_topic_move'), | |
31 url(r'^mod/topic/split/(\d+)/$', main.mod_topic_split, name='forums-mod_topic_split'), | |
32 url(r'^mod/topic/stick/(\d+)/$', main.mod_topic_stick, name='forums-mod_topic_stick'), | |
33 url(r'^my-posts/$', main.my_posts, name='forums-my_posts'), | |
34 url(r'^post/(\d+)/$', main.goto_post, name='forums-goto_post'), | |
35 url(r'^post/ip/(\d+)/$', main.post_ip_info, name='forums-post_ip_info'), | |
36 url(r'^post/new/(?P<topic_id>\d+)/$', main.new_post, name='forums-new_post'), | |
37 url(r'^posts/(?P<username>[\w.@+-]{1,30})/$', main.posts_for_user, name='forums-posts_for_user'), | |
38 url(r'^quick-reply/$', main.quick_reply_ajax, name='forums-quick_reply'), | |
39 url(r'^unanswered/$', main.unanswered_topics, name='forums-unanswered_topics'), | |
40 url(r'^unread/$', main.unread_topics, name='forums-unread_topics'), | |
49 | 41 |
50 urlpatterns += patterns('forums.views.spam', | 42 url(r'^favorite/(\d+)/$', favorites.favorite_topic, name='forums-favorite_topic'), |
51 url(r'^spammer/(\d+)/$', 'spammer', name='forums-spammer'), | 43 url(r'^favorites/$', favorites.manage_favorites, name='forums-manage_favorites'), |
52 url(r'^spammer/nailed/(\d+)/$', 'spammer_nailed', name='forums-spammer_nailed'), | 44 url(r'^favorites/(\d+)/$', favorites.favorites_status, name='forums-favorites_status'), |
53 url(r'^stranger/(\d+)/$', 'stranger', name='forums-stranger'), | 45 url(r'^unfavorite/(\d+)/$', favorites.unfavorite_topic, name='forums-unfavorite_topic'), |
54 ) | |
55 | 46 |
56 urlpatterns += patterns('forums.views.attachments', | 47 url(r'^subscribe/(\d+)/$', subscriptions.subscribe_topic, name='forums-subscribe_topic'), |
57 url(r'^fetch_attachments/$', 'fetch_attachments', name='forums-fetch_attachments'), | 48 url(r'^subscriptions/$', subscriptions.manage_subscriptions, name='forums-manage_subscriptions'), |
58 ) | 49 url(r'^subscriptions/(\d+)/$', subscriptions.subscription_status, name='forums-subscription_status'), |
50 url(r'^unsubscribe/(\d+)/$', subscriptions.unsubscribe_topic, name='forums-unsubscribe_topic'), | |
51 | |
52 url(r'^spammer/(\d+)/$', spam.spammer, name='forums-spammer'), | |
53 url(r'^spammer/nailed/(\d+)/$', spam.spammer_nailed, name='forums-spammer_nailed'), | |
54 url(r'^stranger/(\d+)/$', spam.stranger, name='forums-stranger'), | |
55 | |
56 url(r'^fetch_attachments/$', attachments.fetch_attachments, name='forums-fetch_attachments'), | |
57 ] |