forked from lwyszomi/commcare-hq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
urls.py
142 lines (132 loc) · 7.18 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
from django.conf import settings
from django.conf.urls.defaults import patterns, url, include
from django.views.generic import TemplateView, RedirectView
from corehq.apps.domain.utils import legacy_domain_re
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
from corehq.apps.domain.views import ProBonoStaticView
from corehq.apps.hqwebapp.templatetags.hq_shared_tags import static
from corehq.apps.orgs.urls import organizations_urls
from corehq.apps.reports.urls import report_urls
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'
handler403 = 'corehq.apps.hqwebapp.views.no_permissions'
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
from corehq.apps.sms.urls import sms_admin_interface_urls
domain_specific = patterns('',
url(r'^logo.png', 'corehq.apps.domain.views.logo', name='logo'),
(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'^indicators/mvp/', include('mvp.urls')),
(r'^indicators/', include('corehq.apps.indicators.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'^cleanup/', include('corehq.apps.cleanup.urls')),
(r'^cloudcare/', include('corehq.apps.cloudcare.urls')),
(r'^fixtures/', include('corehq.apps.fixtures.urls')),
(r'^importer/', include('corehq.apps.importer.urls')),
(r'^sqlextract/', include('ctable_view.urls')),
(r'^fri/', include('custom.fri.urls')),
(r'^ilsgateway/', include('custom.ilsgateway.urls')),
(r'^ewsghana/', include('custom.ewsghana.urls')),
(r'^', include('custom.m4change.urls')),
(r'^', include('custom.uth.urls')),
(r'^dashboard/', include('corehq.apps.dashboard.urls')),
(r'^configurable_reports/', include('corehq.apps.userreports.urls')),
)
urlpatterns = patterns('',
(r'^favicon\.ico$', RedirectView.as_view(
url=static('hqwebapp/img/favicon2.png'))),
(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'^organizations/', include(organizations_urls)),
(r'^account/', include('corehq.apps.settings.urls')),
(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/accounting/', include('corehq.apps.accounting.urls')),
(r'^hq/sms/', include(sms_admin_interface_urls)),
(r'^hq/multimedia/', include('corehq.apps.hqmedia.urls')),
(r'^hq/admin/', include('corehq.apps.hqadmin.urls')),
(r'^hq/reports/', include(report_urls)),
(r'^hq/flags/', include('corehq.apps.toggle_ui.urls')),
(r'^hq/pillow_errors/', include('corehq.apps.hqpillow_retry.urls')),
(r'^couchlog/', include('couchlog.urls')),
(r'^formtranslate/', include('formtranslate.urls')),
(r'^unicel/', include('corehq.apps.unicel.urls')),
(r'^tropo/', include('corehq.apps.tropo.urls')),
(r'^twilio/', include('corehq.apps.twilio.urls')),
(r'^megamobile/', include('corehq.apps.megamobile.urls')),
(r'^telerivet/', include('corehq.apps.telerivet.urls')),
(r'^kookoo/', include('corehq.apps.kookoo.urls')),
(r'^yo/', include('corehq.apps.yo.urls')),
(r'^gvi/', include('corehq.apps.grapevine.urls')),
(r'^sislog/', include('corehq.apps.sislog.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'^sqlextract/', include('ctable_view.urls')),
(r'^styleguide/', include('corehq.apps.styleguide.urls')),
(r'^500/$', TemplateView.as_view(template_name='500.html')),
(r'^404/$', TemplateView.as_view(template_name='404.html')),
(r'^403/$', TemplateView.as_view(template_name='403.html')),
url(r'^eula_basic/$', TemplateView.as_view(template_name='eula.html'), name='eula_basic'),
url(r'^eula/$', 'corehq.apps.hqwebapp.views.eula', name='eula'),
url(r'^apache_license_basic/$', TemplateView.as_view(template_name='apache_license.html'), name='apache_license_basic'),
url(r'^apache_license/$', 'corehq.apps.hqwebapp.views.apache_license', name='apache_license'),
url(r'^bsd_license_basic/$', TemplateView.as_view(template_name='bsd_license.html'), name='bsd_license_basic'),
url(r'^bsd_license/$', 'corehq.apps.hqwebapp.views.bsd_license', name='bsd_license'),
url(r'^product_agreement/$', 'corehq.apps.hqwebapp.views.product_agreement', name='product_agreement'),
url(r'^exchange/cda_basic/$', TemplateView.as_view(template_name='cda.html'), name='cda_basic'),
url(r'^exchange/cda/$', 'corehq.apps.hqwebapp.views.cda', name='cda'),
url(r'^sms_in/$', 'corehq.apps.sms.views.sms_in', name='sms_in'),
url(r'^unsubscribe/(?P<user_id>[\w-]+)/',
'corehq.apps.hqwebapp.views.unsubscribe', name='unsubscribe'),
(r'^wisepill/', include('custom.apps.wisepill.urls')),
url(r'^pro_bono/$', ProBonoStaticView.as_view(),
name=ProBonoStaticView.urlname),
url(r'^loadtest/', include('corehq.apps.loadtestendpoints.urls')),
) + 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'),
)