-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathurls.py
55 lines (50 loc) · 1.77 KB
/
urls.py
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
"""
main url configuration file for the askbot site
"""
from django.conf import settings
from django.conf.urls.defaults import handler404
from django.conf.urls.defaults import handler500
from django.conf.urls.defaults import include
from django.conf.urls.defaults import patterns
from django.conf.urls.defaults import url
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy, string_concat
from django.conf import settings
from django.contrib import admin
from askbot import views
import forms
admin.autodiscover()
urlpatterns = patterns('',
url(
r'^questions/(?P<id>\d+)/answer/$',
views.writers.answer,
{ 'form_class': forms.GanswerForm, },
name='answer'
),
)
if getattr(settings, 'ASKBOT_MULTILINGUAL', False) == True:
from django.conf.urls.i18n import i18n_patterns
urlpatterns += i18n_patterns('',
(r'%s' % settings.ASKBOT_URL, include('askbot.urls'))
)
else:
urlpatterns += patterns('',
(r'%s' % settings.ASKBOT_URL, include('askbot.urls'))
)
urlpatterns += patterns('',
(r'^admin/', include(admin.site.urls)),
#(r'^cache/', include('keyedcache.urls')), - broken views disable for now
(r'^settings/', include('askbot.deps.livesettings.urls')),
(r'^followit/', include('followit.urls')),
(r'^tinymce/', include('tinymce.urls')),
(r'^robots.txt$', include('robots.urls')),
url( # TODO: replace with django.conf.urls.static ?
r'^%s(?P<path>.*)$' % settings.MEDIA_URL[1:],
'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT.replace('\\','/')},
),
)
if 'rosetta' in settings.INSTALLED_APPS:
urlpatterns += patterns('',
url(r'^rosetta/', include('rosetta.urls')),
)