コード例 #1
0
 def setUp(self):
     self.run_july_third_test = True
     self.factory = RequestFactory()
     domain = Domain.get_or_create_with_name('icds-test')
     domain.is_active = True
     domain.save()
     user = WebUser.all().first()
     if not user:
         user = WebUser.create('icds-test', 'test', 'passwordtest')
     user.is_authenticated = True
     user.is_superuser = True
     user.is_authenticated = True
     user.is_active = True
     self.user = user
     self.view = PrevalenceOfUndernutritionView.as_view()
     self.url = 'underweight_children'
コード例 #2
0
ファイル: urls.py プロジェクト: demis-svenska/commcare-hq
urlpatterns = [
    url(r'^tableau/(?P<workbook>\w+)/(?P<worksheet>\w+)$',
        TableauView.as_view(),
        name='icds_tableau'),
    url(r'^icds_dashboard/', include(dashboardurls)),
    url(r'^icds-ng-template/(?P<template>[\w-].+)',
        IcdsDynamicTemplateView.as_view(),
        name='icds-ng-template'),
    url(r'^program_summary/(?P<step>[\w-]+)/',
        ProgramSummaryView.as_view(),
        name='program_summary'),
    url(r'^awc_reports/(?P<step>[\w-]+)/',
        AwcReportsView.as_view(),
        name='awc_reports'),
    url(r'^underweight_children/(?P<step>[\w-]+)/',
        PrevalenceOfUndernutritionView.as_view(),
        name='underweight_children'),
    url(r'^prevalence_of_severe/(?P<step>[\w-]+)/',
        PrevalenceOfSevereView.as_view(),
        name='prevalence_of_severe'),
    url(r'^prevalence_of_stunting/(?P<step>[\w-]+)/',
        PrevalenceOfStuntingView.as_view(),
        name='prevalence_of_stunting'),
    url(r'^low_birth/(?P<step>[\w-]+)/',
        NewbornsWithLowBirthWeightView.as_view(),
        name='low_birth'),
    url(r'^early_initiation/(?P<step>[\w-]+)/',
        EarlyInitiationBreastfeeding.as_view(),
        name='early_initiation'),
    url(r'^locations$', LocationView.as_view(), name='icds_locations'),
    url(r'^locations/ancestors$',
 def setUp(self):
     self.run_july_third_test = True
     self.factory = RequestFactory()
     self._setup_domain_and_user()
     self.view = PrevalenceOfUndernutritionView.as_view()
     self.url = 'underweight_children'
コード例 #4
0
    FunctionalToiletView, MedicineKitView, InfantsWeightScaleView, AdultWeightScaleView, AggregationScriptPage, \
    ICDSBugReportView, AWCLocationView, DownloadPDFReport, CheckExportReportStatus, ICDSImagesAccessorAPI, \
    HaveAccessToLocation, InactiveAWW, DownloadExportReport, DishaAPIView, LadySupervisorView, CasDataExport, \
    CasDataExportAPIView, ServiceDeliveryDashboardView, InactiveDashboardUsers

dashboardurls = [
    url(r'^icds_image_accessor/(?P<form_id>[\w\-:]+)/(?P<attachment_id>.*)$',
        ICDSImagesAccessorAPI.as_view(), name='icds_image_accessor'),
    url(r'^data_export', CasDataExportAPIView.as_view(), name='data_export_api'),
    url('^', DashboardView.as_view(), name='icds_dashboard'),
]

maternal_and_child_urls = [
    url(
        r'^underweight_children/(?P<step>[\w-]+)/',
        PrevalenceOfUndernutritionView.as_view(),
        name='underweight_children'),
    url(
        r'^prevalence_of_severe/(?P<step>[\w-]+)/',
        PrevalenceOfSevereView.as_view(),
        name='prevalence_of_severe'),
    url(
        r'^prevalence_of_stunting/(?P<step>[\w-]+)/',
        PrevalenceOfStuntingView.as_view(),
        name='prevalence_of_stunting'),
    url(
        r'^low_birth/(?P<step>[\w-]+)/',
        NewbornsWithLowBirthWeightView.as_view(),
        name='low_birth'),
    url(
        r'^early_initiation/(?P<step>[\w-]+)/',