Esempio n. 1
0
        r'^v2/preview/(?P<app_id>[\w-]+)/$',
        FormplayerPreviewSingleApp.as_view(),
        name=FormplayerPreviewSingleApp.urlname,
    ),
    url(r'^preview_app/(?P<app_id>[\w-]+)/$', PreviewAppView.as_view(), name=PreviewAppView.urlname),
    url(r'^report_formplayer_error', report_formplayer_error, name='report_formplayer_error'),
]

api_urls = [
    url(r'^login_as/users/$', LoginAsUsers.as_view(), name=LoginAsUsers.urlname),
    url(r'^readable_questions/$', waf_allow('XSS_BODY')(ReadableQuestions.as_view()), name=ReadableQuestions.urlname),
]

# used in settings urls
settings_urls = [
    url(r'^app/', EditCloudcareUserPermissionsView.as_view(), name=EditCloudcareUserPermissionsView.urlname),
]

urlpatterns = [
    url(r'^$', default, name='cloudcare_default'),
    url(r'^apps/', include(app_urls)),
    url(r'^api/', include(api_urls)),
]


# This isn't strictly the appropriate place to put this,
# but we don't have similar functionality in formplayer, so it's easier for the time being

waf_allow('XSS_BODY', hard_code_pattern=r'^/formplayer/validate_form$')
waf_allow('XSS_BODY', hard_code_pattern=r'^/formplayer/new-form$')
Esempio n. 2
0
)

api_urls = patterns('corehq.apps.cloudcare.views',
    url(r'^groups/(?P<user_id>[\w-]*)/$', 'get_groups', name='cloudcare_get_groups'),
    url(r'^cases/$', 'get_cases', name='cloudcare_get_cases'),
    url(r'^cases/module/(?P<app_id>[\w-]+)/modules-(?P<module_id>[\w-]+)/$', 
        'filter_cases', name='cloudcare_filter_cases'),
    url(r'^apps/$', 'get_apps_api', name='cloudcare_get_apps'),
    url(r'^apps/(?P<app_id>[\w-]*)/$', 'get_app_api', name='cloudcare_get_app'),
    url(r'^fixtures/(?P<user_id>[\w-]*)/$', 'get_fixtures', name='cloudcare_get_fixtures'),
    url(r'^fixtures/(?P<user_id>[\w-]*)/(?P<fixture_id>[:\w-]*)$', 'get_fixtures', 
        name='cloudcare_get_fixtures'),
    url(r'^sessions/$', 'get_sessions', name='cloudcare_get_sessions'),
    url(r'^sessions/(?P<session_id>[\w-]*)/$', 'get_session_context', name='cloudcare_get_session_context'),

    
)

# used in settings urls
settings_urls = patterns('corehq.apps.cloudcare.views',
    url(r'^app/', EditCloudcareUserPermissionsView.as_view(), name=EditCloudcareUserPermissionsView.urlname),
)

urlpatterns = patterns('corehq.apps.cloudcare.views',
    url(r'^$', 'default', name='cloudcare_default'),
    url(r'^apps/', include(app_urls)),
    url(r'^cases/', include(cases_urls)),
    url(r'^test/$', TemplateView.as_view(template_name='cloudcare/test.html')),
    url(r'^api/', include(api_urls)),
)
Esempio n. 3
0
        name='cloudcare_get_app'),
    url(r'^fixtures/(?P<user_id>[\w-]*)/$',
        'get_fixtures',
        name='cloudcare_get_fixtures'),
    url(r'^fixtures/(?P<user_id>[\w-]*)/(?P<fixture_id>[:\w-]*)$',
        'get_fixtures',
        name='cloudcare_get_fixtures'),
    url(r'^sessions/$', 'get_sessions', name='cloudcare_get_sessions'),
    url(r'^sessions/(?P<session_id>[\w-]*)/$',
        'get_session_context',
        name='cloudcare_get_session_context'),
    url(r'^ledgers/$', 'get_ledgers', name='cloudcare_get_ledgers'),
    url(r'^render_form/$', 'render_form', name='cloudcare_render_form'),
    url(r'^sync_db/$', 'sync_db_api', name='cloudcare_sync_db'),
)

# used in settings urls
settings_urls = patterns(
    'corehq.apps.cloudcare.views',
    url(r'^app/',
        EditCloudcareUserPermissionsView.as_view(),
        name=EditCloudcareUserPermissionsView.urlname),
)

urlpatterns = patterns(
    'corehq.apps.cloudcare.views',
    url(r'^$', 'default', name='cloudcare_default'),
    url(r'^apps/', include(app_urls)),
    url(r'^api/', include(api_urls)),
)