<commit_before>from django.conf.urls import patterns, url, include

from corehq.apps.cloudcare.views import (
    EditCloudcareUserPermissionsView,
    CloudcareMain,
)

app_urls = patterns('corehq.apps.cloudcare.views',
    url(r'^view/(?P<app_id>[\w-]+)/modules-(?P<module_id>[\w-]+)/forms-(?P<form_id>[\w-]+)/context/$',
        'form_context', name='cloudcare_form_context'),
    url(r'^(?P<urlPath>.*)$', CloudcareMain.as_view(), name='cloudcare_main'),
)

api_urls = patterns('corehq.apps.cloudcare.views',
    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'^cases/module/(?P<app_id>[\w-]+)/modules-(?P<module_id>[\w-]+)/parent/(?P<parent_id>[\w-]+)/$',
        'filter_cases', name='cloudcare_filter_cases_with_parent'),
    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'),
    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)),
)<commit_msg>update cloudcare urls<commit_after>from django.conf.urls import patterns, url, include

from corehq.apps.cloudcare.views import (
    EditCloudcareUserPermissionsView,
    CloudcareMain,
    form_context, get_cases, filter_cases, get_apps_api, get_app_api,
    get_fixtures, get_sessions, get_session_context, get_ledgers, render_form,
    sync_db_api, default,
)

app_urls = patterns('corehq.apps.cloudcare.views',
    url(r'^view/(?P<app_id>[\w-]+)/modules-(?P<module_id>[\w-]+)/forms-(?P<form_id>[\w-]+)/context/$',
        form_context, name='cloudcare_form_context'),
    url(r'^(?P<urlPath>.*)$', CloudcareMain.as_view(), name='cloudcare_main'),
)

api_urls = patterns('corehq.apps.cloudcare.views',
    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'^cases/module/(?P<app_id>[\w-]+)/modules-(?P<module_id>[\w-]+)/parent/(?P<parent_id>[\w-]+)/$',
        filter_cases, name='cloudcare_filter_cases_with_parent'),
    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'),
    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)),
)
{'fraction_non_alphanumeric': 0.21825962910128388, 'fraction_numerical': 0.0, 'mean_word_length': 6.011666666666667, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '493202', 'n_tokens_mistral': 1637, 'n_tokens_neox': 1610, 'n_words': 164}