Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 68 lines (65 sloc) 3.827 kB
3b8b429 @evgenyfadeev included changes by Adolfo and Chaitanya and found temporary fix for …
evgenyfadeev authored
1 import os.path
2 from django.conf.urls.defaults import *
3 from django.contrib import admin
4 from forum.views import index
5 from forum import views as app
6 from forum.feed import RssLastestQuestionsFeed
7
8 admin.autodiscover()
9 feeds = {
10 'rss': RssLastestQuestionsFeed
11 }
12
13 APP_PATH = os.path.dirname(__file__)
14 urlpatterns = patterns('',
15 (r'^$', index),
16 (r'^favicon\.ico$', 'django.views.generic.simple.redirect_to', {'url': '/content/images/favicon.ico'}),
17 (r'^favicon\.gif$', 'django.views.generic.simple.redirect_to', {'url': '/content/images/favicon.gif'}),
18 (r'^content/(?P<path>.*)$', 'django.views.static.serve',
19 {'document_root': os.path.join(APP_PATH, 'templates/content').replace('\\','/')}
20 ),
21 (r'^upfiles/(?P<path>.*)$', 'django.views.static.serve',
22 {'document_root': os.path.join(APP_PATH, 'templates/upfiles').replace('\\','/')}
23 ),
24 (r'^account/', include('django_authopenid.urls')),
25 (r'^signin/$', 'django_authopenid.views.signin'),
56f0267 @evgenyfadeev added anonymous posting, per-question subscription and fixes by Pothe…
evgenyfadeev authored
26 url(r'^email/change/$', 'django_authopenid.views.changeemail', name='user_changeemail'),
27 url(r'^email/sendkey/$', 'django_authopenid.views.send_email_key'),
28 url(r'^email/verify/(?P<id>\d+)/(?P<key>[\dabcdef]{32})/$', 'django_authopenid.views.verifyemail', name='user_verifyemail'),
3b8b429 @evgenyfadeev included changes by Adolfo and Chaitanya and found temporary fix for …
evgenyfadeev authored
29 url(r'^about/$', app.about, name='about'),
30 url(r'^faq/$', app.faq, name='faq'),
31 url(r'^privacy/$', app.privacy, name='privacy'),
32 url(r'^logout/$', app.logout, name='logout'),
33 url(r'^answers/(?P<id>\d+)/comments/$', app.answer_comments, name='answer_comments'),
34 url(r'^answers/(?P<id>\d+)/edit/$', app.edit_answer, name='edit_answer'),
35 url(r'^answers/(?P<id>\d+)/revisions/$', app.answer_revisions, name='answer_revisions'),
36 url(r'^questions/$', app.questions, name='questions'),
37 url(r'^questions/ask/$', app.ask, name='ask'),
38 url(r'^questions/unanswered/$', app.unanswered, name='unanswered'),
39 url(r'^questions/(?P<id>\d+)/edit/$', app.edit_question, name='edit_question'),
40 url(r'^questions/(?P<id>\d+)/close/$', app.close, name='close'),
41 url(r'^questions/(?P<id>\d+)/reopen/$', app.reopen, name='reopen'),
42 url(r'^questions/(?P<id>\d+)/answer/$', app.answer, name='answer'),
43 url(r'^questions/(?P<id>\d+)/vote/$', app.vote, name='vote'),
44 url(r'^questions/(?P<id>\d+)/revisions/$', app.question_revisions, name='question_revisions'),
45 url(r'^questions/(?P<id>\d+)/comments/$', app.question_comments, name='question_comments'),
46 url(r'^questions/(?P<question_id>\d+)/comments/(?P<comment_id>\d+)/delete/$', app.delete_question_comment, name='delete_question_comment'),
47 url(r'^answers/(?P<answer_id>\d+)/comments/(?P<comment_id>\d+)/delete/$', app.delete_answer_comment, name='delete_answer_comment'),
48 #place general question item in the end of other operations
49 url(r'^questions/(?P<id>\d+)//*', app.question, name='question'),
50 (r'^tags/$', app.tags),
51 (r'^tags/(?P<tag>[^/]+)/$', app.tag),
52 (r'^users/$',app.users),
53 url(r'^users/(?P<id>\d+)/edit/$', app.edit_user, name='edit_user'),
54 url(r'^users/(?P<id>\d+)//*', app.user, name='user'),
55 url(r'^badges/$',app.badges, name='badges'),
56 url(r'^badges/(?P<id>\d+)//*', app.badge, name='badge'),
57 url(r'^messages/markread/$',app.read_message, name='read_message'),
58 # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
59 (r'^nimda/(.*)', admin.site.root),
60 (r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}),
61 (r'^upload/$', app.upload),
62 url(r'^books/$', app.books, name='books'),
63 url(r'^books/ask/(?P<short_name>[^/]+)/$', app.ask_book, name='ask_book'),
64 url(r'^books/(?P<short_name>[^/]+)/$', app.book, name='book'),
65 url(r'^search/$', app.search, name='search'),
66 (r'^i18n/', include('django.conf.urls.i18n')),
67 )
Something went wrong with that request. Please try again.