def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # Populate classifiers field. self.fields['classifier'].choices = \ form_utils.get_processor_choices('Classifier') # Populate detectors field. self.fields['detectors'].choices = \ form_utils.get_processor_choices('Detector') # Populate station/mics field. names = model_utils.get_station_mic_output_pair_ui_names() choices = [(name, name) for name in names] self.fields['station_mics'].choices = choices
def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # Populate detectors field. self.fields['detector'].choices = \ form_utils.get_processor_choices('Detector') # Populate station/mics field. names = model_utils.get_station_mic_output_pair_ui_names() choices = [(name, name) for name in names] self.fields['station_mic'].choices = choices
def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # Populate detector fields. choices = form_utils.get_processor_choices('Detector') self.fields['source_detector'].choices = choices self.fields['target_detector'].choices = choices # Populate station/mics field. names = model_utils.get_station_mic_output_pair_ui_names() choices = [(n, n) for n in names] self.fields['station_mics'].choices = choices
def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # Populate detectors field. self.fields['detectors'].choices = \ form_utils.get_processor_choices('Detector') # Populate station/mics field. names = model_utils.get_station_mic_output_pair_ui_names() choices = [(n, n) for n in names] self.fields['station_mics'].choices = choices # Populate classification field. self.fields['classification'].choices = \ form_utils.get_string_annotation_value_choices('Classification')
def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # Populate detectors field. self.fields['detectors'].choices = \ form_utils.get_processor_choices('Detector') # Populate stations field. station_names = sorted(s.name for s in Station.objects.all()) self.fields['stations'].choices = [(n, n) for n in station_names] # Populate schedule field. presets = preset_manager.instance.get_flattened_presets( 'Detection Schedule') preset_names = ['/'.join(p[0]) for p in presets] choices = [(None, 'None')] + [(n, n) for n in preset_names] self.fields['schedule'].choices = choices