コード例 #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 = ExclusiveBreastfeedingView.as_view()
     self.url = 'exclusive-breastfeeding'
コード例 #2
0
ファイル: urls.py プロジェクト: demis-svenska/commcare-hq
 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$',
     LocationAncestorsView.as_view(),
     name='icds_locations_ancestors'),
 url(r'^export_indicator$',
     ExportIndicatorView.as_view(),
     name='icds_export_indicator'),
 url(r'^fact_sheets$', FactSheetsView.as_view(), name='fact_sheets'),
 url(r'^exclusive-breastfeeding/(?P<step>[\w-]+)/',
     ExclusiveBreastfeedingView.as_view(),
     name='exclusive-breastfeeding'),
 url(r'^children_initiated/(?P<step>[\w-]+)/',
     ChildrenInitiatedView.as_view(),
     name='children_initiated'),
 url(r'^institutional_deliveries/(?P<step>[\w-]+)/',
     InstitutionalDeliveriesView.as_view(),
     name='institutional_deliveries'),
 url(r'^immunization_coverage/(?P<step>[\w-]+)/',
     ImmunizationCoverageView.as_view(),
     name='immunization_coverage'),
 url(r'^awc_daily_status/(?P<step>[\w-]+)/',
     AWCDailyStatusView.as_view(),
     name='awc_daily_status'),
 url(r'^awcs_covered/(?P<step>[\w-]+)/',
     AWCsCoveredView.as_view(),
 def setUp(self):
     self.run_july_third_test = True
     self.factory = RequestFactory()
     self._setup_domain_and_user()
     self.view = ExclusiveBreastfeedingView.as_view()
     self.url = 'exclusive-breastfeeding'
コード例 #4
0
        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'^exclusive-breastfeeding/(?P<step>[\w-]+)/',
        ExclusiveBreastfeedingView.as_view(),
        name='exclusive-breastfeeding'),
    url(
        r'^children_initiated/(?P<step>[\w-]+)/',
        ChildrenInitiatedView.as_view(),
        name='children_initiated'),
    url(
        r'^institutional_deliveries/(?P<step>[\w-]+)/',
        InstitutionalDeliveriesView.as_view(),
        name='institutional_deliveries'),
    url(
        r'^immunization_coverage/(?P<step>[\w-]+)/',
        ImmunizationCoverageView.as_view(),
        name='immunization_coverage'),
]