Repository navigation
Expand file tree
/
Copy pathurls.py
More file actions
53 lines (39 loc) · 1.62 KB
/
Copy pathurls.py
File metadata and controls
53 lines (39 loc) · 1.62 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
from django.conf.urls.defaults import *
import mentortogether
import settings
import django.views.static
from mentortogether.user import views
# Enable Admin Interface
from django.contrib import admin
admin.autodiscover()
# FIXME: Split urls into apps
# Url Controller
urlpatterns = patterns('',
url(r'^$',
view='mentortogether.views.root', name='welcome'),
url(r'^h/$',
view='mentortogether.views.home', name='user-home'),
(r'^admin/', include(admin.site.urls)),
(r'^u/', include('mentortogether.user.urls')),
(r'^m/', include('mentortogether.mentor.urls')),
# mentortogether user views
# (r'^m/(?P<username>.*)/wp/$', 'mentortogether.mentor.views.wp'),
# (r'^m/(?P<username>.*)/archive/$',
# 'mentortogether.mentor.views.archive_index'),
# (r'^m/(?P<username>.*)/archive/(?P<yyyy>[0-9]+)/(?P<mm>[0-9]+)/(?P<dd>[0-9]+)$',
# 'mentortogether.mentor.views.archive'),
#
# (r'^m/(?P<username>.*)/$', 'mentortogether.mentor.views.mentorship'),
# Curriculum views
# (r'^a/curriculum/', include('curriculum.urls')),
(r'^_debug/$', 'mentortogether.views.debug' ),
# Map MEDIA_URL to MEDIA_ROOT
(r'^%s/(?P<path>.*)$' % settings.MEDIA_URL.strip('/'),
django.views.static.serve, { 'document_root' : settings.MEDIA_ROOT } ),
(r'^media/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': 'media'}),
(r'^imgs/(?P<path>.*)$',
django.views.static.serve, { 'document_root' : 'media/imgs' } ),
(r'^css/(?P<path>.*)$',
django.views.static.serve, { 'document_root' : 'media/css' } )
)