-
Notifications
You must be signed in to change notification settings - Fork 4
/
urls.py
executable file
·44 lines (38 loc) · 1.61 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
# coding: utf-8
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.conf import settings
from django.views.generic import TemplateView
admin.autodiscover()
handler500 = 'utils.error_views.error500'
handler403 = 'utils.error_views.error403'
handler404 = 'utils.error_views.error404'
urlpatterns = patterns('',
url(
r'^$',
TemplateView.as_view(template_name='index.html'),
name='index'
),
url(r'^admin/', include(admin.site.urls)),
url(r'', include('users.urls')),
url(r'', include('chemistry.urls')),
url(
'^download/$',
TemplateView.as_view(template_name='download.html'),
name="download"
),
url(
r'^features/$',
TemplateView.as_view(template_name='features.html'),
name="features"
),
)
urlpatterns += staticfiles_urlpatterns()
# for develop to serve user-upload content in MEDIA_ROOT
if settings.DEBUG:
urlpatterns += patterns('',
url(r'media/(?P<path>.*)$',
'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT}),
)