Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: fc6f4f25e9
Fetching contributors…

Cannot retrieve contributors at this time

file 84 lines (76 sloc) 5.248 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
r"""

occupywallst.urls
~~~~~~~~~~~~~~~~~

HTTP request routing.

"""

from django.conf import settings
from django.conf.urls.defaults import patterns, url, include
from django.views.decorators.http import require_GET, require_POST
from django.contrib import admin as site_admin
from occupywallst import admin, api, utils, feeds

site_admin.autodiscover()

urlpatterns = patterns('',
    url(r'^$', 'occupywallst.views.index', {'per_page': 5}, name='index'),
    url(r'^rss/news/$', feeds.RSSNewsFeed(), name='rss-news'),
    url(r'^rss/forum/$', feeds.RSSForumFeed(), name='rss-forum'),
    url(r'^rss/comments/$', feeds.RSSCommentFeed(), name='rss-comments'),
    url(r'^(?P<prefix>archive/)((?P<month>[A-Za-z]{3,})-((?P<day>[1-3]?\d)-)?(?P<year>\d{4})/)?(page-(?P<page>\d+)/)?$', 'occupywallst.views.archive', {'is_forum': False, 'per_page': 5}),
    url(r'^(?P<prefix>forum/archive/)((?P<month>[A-Za-z]{3,})-((?P<day>[1-3]?\d)-)?(?P<year>\d{4})/)?(page-(?P<page>\d+)/)?$', 'occupywallst.views.archive', {'is_forum': True, 'per_page': 50}),
    url(r'^article/(?P<slug>[-_\d\w]+)/$', 'occupywallst.views.article', name='article'),
    url(r'^tag/(?P<tag>.+?)/((?P<page>\d+)/)?$', 'occupywallst.views.showtag', {'per_page': 5}, name='tag'),
    url(r'^fightback/$', 'occupywallst.views.fightback', name='fightback'),
    url(r'^fightback/(?P<pledgeid>\d+)/$', 'occupywallst.views.fightback_sig', name='fightback_sig'),
    url(r'^fightback/all/$', 'occupywallst.views.fightback_sigs', name='fightback_sigs'),
    url(r'^forum/$', 'occupywallst.views.forum', name='forum'),
    url(r'^forum/search/$', 'occupywallst.views.forum_search', name='forum-search'),
    url(r'^forum/comments/$', 'occupywallst.views.forum_comments', name='forum-comments'),
    url(r'^forum/(?P<slug>[-_\d\w]+)/$', 'occupywallst.views.thread', name='forum-post'),
    url(r'^notification/(?P<id>\d+)/$', 'occupywallst.views.notification', name='notification'),
    url(r'^subscribe/(?P<id>\d+)/$', 'occupywallst.views.subscribe', name='subscribe'),
    url(r'^confirm/(?P<token>[a-z0-9]+)/$', 'occupywallst.views.confirm', name='confirm'),
    url(r'^rides/', include('rideshare.urls')),
    url(r'^login/$', 'occupywallst.views.login', name='login'),
    url(r'^logout/$', 'occupywallst.views.logout', name='logout'),
    url(r'^signup/$', 'occupywallst.views.signup', name='signup'),
    url(r'^error/$', 'occupywallst.views.error', name='error'),
    url(r'^users/(?P<username>[-_\d\w]+)/$', 'occupywallst.views.user_page', name='user'),
    url(r'^users/(?P<username>[-_\d\w]+)/edit/$', 'occupywallst.views.edit_profile', name='user-edit'),
    url(r'^api/safe/attendees/$', require_GET(utils.api_view(api.attendees))),
    url(r'^api/safe/attendee_info/$', require_GET(utils.api_view(api.attendee_info))),
    url(r'^api/safe/article_get/$', require_GET(utils.api_view(api.article_get))),
    url(r'^api/safe/article_get_comments/$', require_GET(utils.api_view(api.article_get_comments))),
    url(r'^api/safe/article_get_comment_votes/$', require_GET(utils.api_view(api.article_get_comment_votes))),
    url(r'^api/safe/comment_get/$', require_GET(utils.api_view(api.comment_get))),
    url(r'^api/safe/carousel_get/$', require_GET(utils.api_view(api.carousel_get))),
    url(r'^api/safe/forumlinks/$', require_GET(utils.api_view(api.forumlinks))),
    url(r'^api/safe/commentfeed/$', require_GET(utils.api_view(api.commentfeed))),
    url(r'^api/article_new/$', require_POST(utils.api_view(api.article_new))),
    url(r'^api/article_edit/$', require_POST(utils.api_view(api.article_edit))),
    url(r'^api/article_delete/$', require_POST(utils.api_view(api.article_delete))),
    url(r'^api/article_remove/$', require_POST(utils.api_view(api.article_remove))),
    url(r'^api/comment_new/$', require_POST(utils.api_view(api.comment_new))),
    url(r'^api/comment_edit/$', require_POST(utils.api_view(api.comment_edit))),
    url(r'^api/comment_remove/$', require_POST(utils.api_view(api.comment_remove))),
    url(r'^api/comment_delete/$', require_POST(utils.api_view(api.comment_delete))),
    url(r'^api/comment_upvote/$', require_POST(utils.api_view(api.comment_upvote))),
    url(r'^api/comment_downvote/$', require_POST(utils.api_view(api.comment_downvote))),
    url(r'^api/message_send/$', require_POST(utils.api_view(api.message_send))),
    url(r'^api/message_delete/$', require_POST(utils.api_view(api.message_delete))),
    url(r'^api/check_username/$', require_POST(utils.api_view(api.check_username))),
    url(r'^api/shadowban/$', require_POST(utils.api_view(api.shadowban))),
    url(r'^api/signup/$', require_POST(utils.api_view(api.signup))),
    url(r'^api/login/$', require_POST(utils.api_view(api.login))),
    url(r'^api/logout/$', require_POST(utils.api_view(api.logout))),
    url(r'^i18n/', include('django.conf.urls.i18n')),
    url(r'^rosetta/', include('rosetta.urls')),
    url(r'^admin/', include(site_admin.site.urls)),
)

if settings.DEBUG:
    urlpatterns += patterns('',
        url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
            {'document_root': settings.MEDIA_ROOT}),
    )

#catch all afer the debug static files
urlpatterns += patterns('',
    url(r'^(.*)$', 'occupywallst.views.bonus')
)
Something went wrong with that request. Please try again.