def __init__(self, domain_object, timezone, *args, **kwargs): self.timezone = timezone super(FilterCaseESExportDownloadForm, self).__init__(domain_object, *args, **kwargs) self.helper.label_class = 'col-sm-3 col-md-2 col-lg-2' self.helper.field_class = 'col-sm-9 col-md-8 col-lg-3' # update date_range filter's initial values to span the entirety of # the domain's submission range default_datespan = datespan_from_beginning(self.domain_object, self.timezone) self.fields['date_range'].widget = DateRangePickerWidget( default_datespan=default_datespan )
def __init__(self, domain_object, timezone, *args, **kwargs): self.timezone = timezone super(GenericFilterFormExportDownloadForm, self).__init__(domain_object, *args, **kwargs) self.fields['date_range'].help_text = _( "Filters forms by date received. The timezone for this export is %(timezone)s." ) % { 'timezone': self.timezone, } # update date_range filter's initial values to span the entirety of # the domain's submission range default_datespan = datespan_from_beginning(self.domain_object, self.timezone) self.fields['date_range'].widget = DateRangePickerWidget( default_datespan=default_datespan )