Пример #1
0
    url(r"^(?P<username>\w+)/exports/(?P<id_string>[^/]+)/(?P<export_type>\w+)"
        "/delete$", 'onadata.apps.viewer.views.delete_export'),
    url(r"^(?P<username>\w+)/exports/(?P<id_string>[^/]+)/(?P<export_type>\w+)"
        "/progress$", 'onadata.apps.viewer.views.export_progress'),
    url(r"^(?P<username>\w+)/exports/(?P<id_string>[^/]+)/(?P<export_type>\w+)"
        "/$", 'onadata.apps.viewer.views.export_list'),
    url(r"^(?P<username>\w+)/exports/(?P<id_string>[^/]+)/(?P<export_type>\w+)"
        "/(?P<filename>[^/]+)$",
        'onadata.apps.viewer.views.export_download'),

    # odk data urls
    url(r"^submission$",
        XFormSubmissionViewSet.as_view({'post': 'create', 'head': 'create'}),
        name='submissions'),
    url(r"^formList$",
        XFormListViewSet.as_view({'get': 'list'}), name='form-list'),
    url(r"^(?P<username>\w+)/formList$",
        XFormListViewSet.as_view({'get': 'list'}), name='form-list'),
    url(r"^(?P<username>\w+)/xformsManifest/(?P<pk>[\d+^/]+)$",
        XFormListViewSet.as_view({'get': 'manifest'}),
        name='manifest-url'),
    url(r"^xformsManifest/(?P<pk>[\d+^/]+)$",
        XFormListViewSet.as_view({'get': 'manifest'}),
        name='manifest-url'),
    url(r"^(?P<username>\w+)/xformsMedia/(?P<pk>[\d+^/]+)"
        "/(?P<metadata>[\d+^/.]+)$",
        XFormListViewSet.as_view({'get': 'media'}), name='xform-media'),
    url(r"^(?P<username>\w+)/xformsMedia/(?P<pk>[\d+^/]+)"
        "/(?P<metadata>[\d+^/.]+)\.(?P<format>[a-z]+[0-9]*)$",
        XFormListViewSet.as_view({'get': 'media'}), name='xform-media'),
    url(r"^xformsMedia/(?P<pk>[\d+^/]+)/(?P<metadata>[\d+^/.]+)$",
Пример #2
0
    url(
        r"^(?P<username>\w+)/exports/(?P<id_string>[^/]+)/(?P<export_type>\w+)"
        "/$", 'onadata.apps.viewer.views.export_list'),
    url(
        r"^(?P<username>\w+)/exports/(?P<id_string>[^/]+)/(?P<export_type>\w+)"
        "/(?P<filename>[^/]+)$", 'onadata.apps.viewer.views.export_download'),

    # odk data urls
    url(r"^submission$",
        XFormSubmissionViewSet.as_view({
            'post': 'create',
            'head': 'create'
        }),
        name='submissions'),
    url(r"^formList$",
        XFormListViewSet.as_view({'get': 'list'}),
        name='form-list'),
    url(r"^(?P<username>\w+)/formList$",
        XFormListViewSet.as_view({'get': 'list'}),
        name='form-list'),
    url(r"^(?P<username>\w+)/xformsManifest/(?P<pk>[\d+^/]+)$",
        XFormListViewSet.as_view({'get': 'manifest'}),
        name='manifest-url'),
    url(r"^xformsManifest/(?P<pk>[\d+^/]+)$",
        XFormListViewSet.as_view({'get': 'manifest'}),
        name='manifest-url'),
    url(
        r"^(?P<username>\w+)/xformsMedia/(?P<pk>[\d+^/]+)"
        "/(?P<metadata>[\d+^/.]+)$",
        XFormListViewSet.as_view({'get': 'media'}),
        name='xform-media'),
Пример #3
0
    re_path(r'^(?P<username>\w+)/exports/(?P<id_string>[^/]+)/(?P<export_type>\w+)' # noqa
        '/delete$', viewer_views.delete_export, name='delete-export'),
    re_path(r'^(?P<username>\w+)/exports/(?P<id_string>[^/]+)/(?P<export_type>\w+)' # noqa
        '/progress$', viewer_views.export_progress, name='export-progress'),
    re_path(r'^(?P<username>\w+)/exports/(?P<id_string>[^/]+)/(?P<export_type>\w+)' # noqa
        '/$', viewer_views.export_list, name='export-list'),
    re_path(r'^(?P<username>\w+)/exports/(?P<id_string>[^/]+)/(?P<export_type>\w+)' # noqa
        '/(?P<filename>[^/]+)$',
        viewer_views.export_download, name='export-download'),

    # odk data urls
    re_path(r'^submission$',
        XFormSubmissionViewSet.as_view({'post': 'create', 'head': 'create'}),
        name='submissions'),
    re_path(r'^formList$',
        XFormListViewSet.as_view({'get': 'list', 'head': 'list'}),
        name='form-list'),
    re_path(r'^(?P<username>\w+)/formList$',
        XFormListViewSet.as_view({'get': 'list', 'head': 'list'}),
        name='form-list'),
    re_path(r'^(?P<username>\w+)/(?P<xform_pk>\d+)/formList$',
        XFormListViewSet.as_view({'get': 'list', 'head': 'list'}),
        name='form-list'),
    re_path(r'^preview/(?P<username>\w+)/(?P<xform_pk>\d+)/formList$',
        PreviewXFormListViewSet.as_view({'get': 'list', 'head': 'list'}),
        name='form-list'),
    re_path(r'^preview/(?P<username>\w+)/formList$',
        PreviewXFormListViewSet.as_view({'get': 'list', 'head': 'list'}),
        name='form-list'),
    re_path(r'^(?P<username>\w+)/xformsManifest/(?P<pk>[\d+^/]+)$',
        XFormListViewSet.as_view({'get': 'manifest', 'head': 'manifest'}),