Revert "Add use_slave to urls that don't update the DB."

This reverts commit a6d2e46a1e.
This commit is contained in:
Ray Schamp 2014-07-22 15:59:49 -04:00
parent a6d2e46a1e
commit 6bf476504c

View file

@ -1,5 +1,4 @@
from django.conf.urls.defaults import *
from django_replicated.decorators import use_slave
from djangobb_forum import settings as forum_settings
from djangobb_forum import views as forum_views
@ -13,10 +12,10 @@ from djangobb_forum.forms import EssentialsProfileForm, \
urlpatterns = patterns('',
# Forum
url('^$', use_slave(forum_views.index), name='index'),
url('^(?P<forum_id>\d+)/$', use_slave(forum_views.show_forum), name='forum'),
url('^$', forum_views.index, name='index'),
url('^(?P<forum_id>\d+)/$', forum_views.show_forum, name='forum'),
url('^moderate/(?P<forum_id>\d+)/$', forum_views.moderate, name='moderate'),
url('^search/$', use_slave(forum_views.search), name='search'),
url('^search/$', forum_views.search, name='search'),
url('^misc/$', forum_views.misc, name='misc'),
url('^youtube/(?P<video_id>[\w-]+)/$', forum_views.show_youtube_video, name='show_youtube_video'),
# User
@ -24,8 +23,8 @@ urlpatterns = patterns('',
# Topic
url('^topic/(?P<topic_id>\d+)/$', forum_views.show_topic, name='topic'),
url('^topic/(?P<topic_id>\d+)/unread/$', use_slave(forum_views.show_unread_posts), name='topic_unread'),
url('^topic/(?P<topic_id>\d+)/title/$', use_slave(forum_views.get_topic_title), name='topic_title'),
url('^topic/(?P<topic_id>\d+)/unread/$', forum_views.show_unread_posts, name='topic_unread'),
url('^topic/(?P<topic_id>\d+)/title/$', forum_views.get_topic_title, name='topic_title'),
url(r'^(?P<forum_id>\d+)/topic/add/$', forum_views.add_topic, name='add_topic'),
url('^topic/(?P<topic_id>\d+)/delete_posts/$', forum_views.delete_posts, name='delete_posts'),
url('^topic/move/$', forum_views.move_topic, name='move_topic'),
@ -34,32 +33,32 @@ urlpatterns = patterns('',
url('^topic/(?P<topic_id>\d+)/open_close/(?P<action>[c|o])/$', forum_views.open_close_topic, name='open_close_topic'),
# Post
url('^post/(?P<post_id>\d+)/$', use_slave(forum_views.show_post), name='post'),
url('^post/(?P<post_id>\d+)/$', forum_views.show_post, name='post'),
url('^post/(?P<post_id>\d+)/edit/$', forum_views.edit_post, name='edit_post'),
url('^post/(?P<post_id>\d+)/delete/$', forum_views.delete_post, name='delete_post'),
url('^post/(?P<post_id>\d+)/mark_spam/$', forum_views.mark_spam, name='mark_post_spam'),
url('^post/(?P<post_id>\d+)/mark_ham/$', forum_views.mark_ham, name='mark_post_ham'),
url('^post/(?P<post_id>\d+)/source/$', use_slave(forum_views.get_post_source), name='post_source'),
url('^post/(?P<post_id>\d+)/source/$', forum_views.get_post_source, name='post_source'),
# Post preview
url(r'^preview/$', use_slave(forum_views.post_preview), name='post_preview'),
url(r'^preview/$', forum_views.post_preview, name='post_preview'),
# Reports
url(r'^reports/$', forum_views.reports, name='forum_reports'),
# Administration
url(r'^admin/ajax/delete-all-posts/(?P<username>[-\w]+)/$', forum_views.delete_all_posts_by_user),
url(r'^admin/ajax/post-count/(?P<username>[-\w]+)/$', use_slave(forum_views.get_user_post_count)),
url(r'^admin/ajax/post-count/(?P<username>[-\w]+)/$', forum_views.get_user_post_count),
# Subscription
url('^subscription/topic/(?P<topic_id>\d+)/delete/$', forum_views.delete_subscription, name='forum_delete_subscription'),
url('^subscription/topic/(?P<topic_id>\d+)/add/$', forum_views.add_subscription, name='forum_add_subscription'),
# Feeds
url(r'^feeds/posts/$', use_slave(LastPosts()), name='forum_posts_feed'),
url(r'^feeds/topics/$', use_slave(LastTopics()), name='forum_topics_feed'),
url(r'^feeds/topic/(?P<topic_id>\d+)/$', use_slave(LastPostsOnTopic()), name='forum_topic_feed'),
url(r'^feeds/forum/(?P<forum_id>\d+)/$', use_slave(LastPostsOnForum()), name='forum_forum_feed'),
url(r'^feeds/category/(?P<category_id>\d+)/$', use_slave(LastPostsOnCategory()), name='forum_category_feed'),
url(r'^feeds/posts/$', LastPosts(), name='forum_posts_feed'),
url(r'^feeds/topics/$', LastTopics(), name='forum_topics_feed'),
url(r'^feeds/topic/(?P<topic_id>\d+)/$', LastPostsOnTopic(), name='forum_topic_feed'),
url(r'^feeds/forum/(?P<forum_id>\d+)/$', LastPostsOnForum(), name='forum_forum_feed'),
url(r'^feeds/category/(?P<category_id>\d+)/$', LastPostsOnCategory(), name='forum_category_feed'),
)
### EXTENSIONS ###
@ -69,13 +68,13 @@ if (forum_settings.LOFI_SUPPORT):
urlpatterns += patterns('',
url('^m/$', forum_views.index, {'full':False}, name='mobile_index'),
url('^m/signin/$', 'django.contrib.auth.views.login', {'template_name':'djangobb_forum/mobile/sign_in.html',}, name='mobile_sign_in'),
url('^m/search/$', use_slave(forum_views.search), {'full':False}, name='mobile_search'),
url('^m/(?P<forum_id>\d+)/$', use_slave(forum_views.show_forum), {'full':False}, name='mobile_forum'),
url('^m/search/$', forum_views.search, {'full':False}, name='mobile_search'),
url('^m/(?P<forum_id>\d+)/$', forum_views.show_forum, {'full':False}, name='mobile_forum'),
url('^m/(?P<forum_id>\d+)/topic/add/$', forum_views.add_topic, {'full':False}, name='mobile_add_topic'),
url('^m/post/(?P<post_id>\d+)/$', use_slave(forum_views.show_post), {'full':False}, name='mobile_post'),
url('^m/post/(?P<post_id>\d+)/$', forum_views.show_post, {'full':False}, name='mobile_post'),
url('^m/post/(?P<post_id>\d+)/reply/$', forum_views.mobile_reply, name='mobile_reply'),
url('^m/topic/(?P<topic_id>\d+)/$', forum_views.show_topic, {'full':False}, name='mobile_topic'),
url('^m/topic/(?P<topic_id>\d+)/unread/$', use_slave(forum_views.show_unread_posts), {'full':False}, name='mobile_topic_unread'),
url('^m/topic/(?P<topic_id>\d+)/unread/$', forum_views.show_unread_posts, {'full':False}, name='mobile_topic_unread'),
)
# REPUTATION Extension
@ -87,5 +86,5 @@ if (forum_settings.REPUTATION_SUPPORT):
# ATTACHMENT Extension
if (forum_settings.ATTACHMENT_SUPPORT):
urlpatterns += patterns('',
url('^attachment/(?P<hash>\w+)/$', use_slave(forum_views.show_attachment), name='forum_attachment'),
url('^attachment/(?P<hash>\w+)/$', forum_views.show_attachment, name='forum_attachment'),
)