forked from dimagi/commcare-hq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathurls.py
103 lines (94 loc) · 4.95 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
from django.conf.urls.defaults import *
from django.conf import settings
from corehq.apps.domain.utils import legacy_domain_re
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
try:
from localsettings import LOCAL_APP_URLS
except ImportError:
LOCAL_APP_URLS = ()
admin.autodiscover()
handler500 = 'corehq.apps.hqwebapp.views.server_error'
handler404 = 'corehq.apps.hqwebapp.views.not_found'
from corehq.apps.hqwebapp.urls import domain_specific as hqwebapp_domain_specific
from corehq.apps.settings.urls import domain_specific as settings_domain_specific
from corehq.apps.settings.urls import users_redirect, domain_redirect
from corehq.apps.adm.urls import adm_admin_interface_urls
domain_specific = patterns('',
(r'^apps/', include('corehq.apps.app_manager.urls')),
(r'^api/', include('corehq.apps.api.urls')),
# the receiver needs to accept posts at an endpoint that might
# not have a slash, so don't include it at the root urlconf
(r'^receiver', include('corehq.apps.receiverwrapper.urls')),
(r'^migration/', include('corehq.apps.migration.urls')),
(r'^settings/', include(settings_domain_specific)),
(r'^users/', include(users_redirect)),
(r'^domain/', include(domain_redirect)),
(r'^groups/', include('corehq.apps.groups.urls')),
(r'^phone/', include('corehq.apps.ota.urls')),
(r'^phone/', include('corehq.apps.mobile_auth.urls')),
(r'^sms/', include('corehq.apps.sms.urls')),
(r'^commtrack/', include('corehq.apps.commtrack.urls')),
(r'^reminders/', include('corehq.apps.reminders.urls')),
(r'^reports/adm/', include('corehq.apps.adm.urls')),
(r'^reports/', include('corehq.apps.reports.urls')),
(r'^data/', include('corehq.apps.data_interfaces.urls')),
(r'^', include(hqwebapp_domain_specific)),
(r'^case/', include('corehq.apps.hqcase.urls')),
(r'^submitlist/', include('corehq.apps.hqsofabed.urls')),
(r'^cleanup/', include('corehq.apps.cleanup.urls')),
(r'^phonelog/', include('phonelog.urls')),
(r'^cloudcare/', include('corehq.apps.cloudcare.urls')),
(r'^fixtures/', include('corehq.apps.fixtures.urls')),
(r'^importer/', include('corehq.apps.importer.urls')),
)
urlpatterns = patterns('',
# Uncomment the next line to enable the admin:
(r'^auditcare/', include('auditcare.urls')),
(r'^admin/', include(admin.site.urls)),
(r'^register/', include('corehq.apps.registration.urls')),
(r'^a/(?P<domain>%s)/' % legacy_domain_re, include(domain_specific)),
(r'^o/', include('corehq.apps.orgs.urls')),
(r'^account/', include('corehq.apps.settings.urls')),
url(r'^organizations/$', 'corehq.apps.orgs.views.orgs_base', name='orgs_base'),
(r'^couch/', include('djangocouch.urls')),
(r'^project_store(.*)$', 'corehq.apps.appstore.views.rewrite_url'),
(r'^exchange/', include('corehq.apps.appstore.urls')),
(r'^webforms/', include('touchforms.formplayer.urls')),
(r'', include('corehq.apps.hqwebapp.urls')),
(r'', include('corehq.apps.domain.urls')),
(r'^adm/', include(adm_admin_interface_urls)),
(r'^announcements/', include('corehq.apps.announcements.urls')),
(r'^hq/billing/', include('hqbilling.urls')),
(r'^hq/multimedia/', include('corehq.apps.hqmedia.urls')),
(r'^hq/admin/', include('corehq.apps.hqadmin.urls')),
(r'^hq/prescriptions/', include('corehq.apps.prescriptions.urls')),
(r'^couchlog/', include('couchlog.urls')),
(r'^facilities/', include('corehq.apps.facilities.urls')),
(r'^formtranslate/', include('formtranslate.urls')),
(r'^unicel/', include('corehq.apps.unicel.urls')),
(r'^tropo/', include('corehq.apps.tropo.urls')),
(r'^kookoo/', include('corehq.apps.kookoo.urls')),
(r'^yo/', include('corehq.apps.yo.urls')),
(r'^langcodes/', include('langcodes.urls')),
(r'^builds/', include('corehq.apps.builds.urls')),
(r'^downloads/temp/', include('soil.urls')),
(r'^test/CommCare.jar', 'corehq.apps.app_manager.views.download_test_jar'),
(r'^translations/', include('corehq.apps.translations.urls')),
(r'^500/$', 'django.views.generic.simple.direct_to_template', {'template': '500.html'}),
(r'^404/$', 'django.views.generic.simple.direct_to_template', {'template': '404.html'}),
url(r'^eula_basic/$', 'django.views.generic.simple.direct_to_template', {'template': 'eula.html'}, name='eula_basic'),
url(r'^eula/$', 'corehq.apps.hqwebapp.views.eula', name='eula'),
url(r'^exchange/cda_basic/$', 'django.views.generic.simple.direct_to_template', {'template': 'cda.html'}, name='cda_basic'),
url(r'^exchange/cda/$', 'corehq.apps.hqwebapp.views.cda', name='cda'),
) + patterns('', *LOCAL_APP_URLS)
# django rosetta support if configured
if 'rosetta' in settings.INSTALLED_APPS:
urlpatterns += patterns('',
url(r'^rosetta/', include('rosetta.urls')),
)
#django-staticfiles static/ url mapper
if settings.DEBUG:
urlpatterns += patterns('django.contrib.staticfiles.views',
url(r'^static/(?P<path>.*)$', 'serve'),
)