-
Notifications
You must be signed in to change notification settings - Fork 0
/
urls.py
41 lines (32 loc) · 1.55 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
from django.conf.urls.defaults import *
from deploy.webfabric.views import project, project_configuration_save, project_create, project_manage, \
project_stage, project_fabfile, project_fabfile_view, project_fabfile_save
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
#(r'^admin/', include('admin.site.urls')),
# Example:
# (r'^deploy/', include('deploy.foo.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/(.*)', admin.site.root),
(r'^project/?(?P<project_id>\d+)?/?$', project),
(r'^project/configuration/save/?$', project_configuration_save),
(r'^project/create/?(?P<project_id>\d+)?/?$', project_create),
(r'^project/(?P<project_id>\d+)/manage/?$', project_manage),
(r'^project/(?P<project_id>\d+)/stage/?$', project_stage),
(r'^project/(?P<project_id>\d+)/fabfile/?$', project_fabfile),
(r'^project/(?P<project_id>\d+)/fabfile/view/?$', project_fabfile_view),
(r'^project/(?P<project_id>\d+)/fabfile/save/?$', project_fabfile_save),
)
from django.conf import settings
import os
path = os.path.dirname(__file__)
MEDIA_ROOT = (os.path.abspath(path + '/media'))
if settings.DEBUG:
urlpatterns += patterns('',
(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '%s' % MEDIA_ROOT}),
)