def total_for_district(self, form): loc = get_location_by_type(form=form, type=u'district') count = _locations_per_type(form.domain, 'PPS', loc) yield { 'date': form_date(form), 'value': count }
def total_for_region(self, form): loc = get_location_by_type(form=form, type=u'r\xe9gion') count = _locations_per_type(form.domain, 'PPS', loc) yield { 'date': form_date(form), 'value': count }