-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathurls.py
executable file
·40 lines (30 loc) · 1.44 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
from django.conf.urls.defaults import *
from django.conf import settings
import os
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
(r'^field/', include('field.urls')),
(r'^model/', include('model.urls')),
(r'^application/', include('application.urls')),
(r'^project/', include('project.urls')),
(r'^form/', include('form.urls')),
#(r'^view/', include('model.urls')),
# Uncomment the admin/doc line below and add 'django.contrib.admindocs'
# to INSTALLED_APPS to enable admin documentation:
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
(r'^admin/', include(admin.site.urls)),
url(r'^logout/$', 'django.contrib.auth.views.logout_then_login', name='logout_then_login'),
(r'^accounts/', include('registration.backends.default.urls')),
)
urlpatterns += patterns('django.views.generic.simple',
(r'^$', 'redirect_to', {'url': '/project/list/'}),
url(r'^screenshot/$', 'direct_to_template', {'template': 'screenshot.html'}, name='screenshot'),
)
if settings.DEBUG:
urlpatterns+= patterns('',
(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root':os.path.join(settings.PROJECT_PATH,'static/')}),
(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root':os.path.join(settings.PROJECT_PATH,'media/')}),
)