Beispiel #1
0
 def __init__(self, *args, **kwargs):
     super(RulesetForm, self).__init__(*args, **kwargs)
     sourceatversion = SourceAtVersion.objects.all()
     self.fields['sources'].queryset = sourceatversion
     self.fields['action'].choices = Ruleset.get_transformation_choices(key=Transformation.ACTION)
     self.fields['lateral'].choices = Ruleset.get_transformation_choices(key=Transformation.LATERAL)
     self.fields['target'].choices = Ruleset.get_transformation_choices(key=Transformation.TARGET)
Beispiel #2
0
 def __init__(self, *args, **kwargs):
     super(RulesetForm, self).__init__(*args, **kwargs)
     sourceatversion = SourceAtVersion.objects.all()
     self.fields['sources'].queryset = sourceatversion
     self.fields['action'].choices = Ruleset.get_transformation_choices(key=Transformation.ACTION)
     self.fields['lateral'].choices = Ruleset.get_transformation_choices(key=Transformation.LATERAL)
     self.fields['target'].choices = Ruleset.get_transformation_choices(key=Transformation.TARGET)
Beispiel #3
0
 def __init__(self, *args, **kwargs):
     super(RulesetEditForm, self).__init__(*args, **kwargs)
     self.fields['action'].choices = Ruleset.get_transformation_choices(
         key=Transformation.ACTION)
     self.fields['lateral'].choices = Ruleset.get_transformation_choices(
         key=Transformation.LATERAL)
     self.fields['target'].choices = Ruleset.get_transformation_choices(
         key=Transformation.TARGET)
Beispiel #4
0
    def __init__(self, *args, **kwargs):
        super(RulesetForm, self).__init__(*args, **kwargs)

        from scirius.utils import get_middleware_module
        sourceatversion = SourceAtVersion.objects.exclude(
            source__datatype__in=get_middleware_module(
                'common').custom_source_datatype(True))
        self.fields['sources'].queryset = sourceatversion
        self.fields['action'].choices = Ruleset.get_transformation_choices(
            key=Transformation.ACTION)
        self.fields['lateral'].choices = Ruleset.get_transformation_choices(
            key=Transformation.LATERAL)
        self.fields['target'].choices = Ruleset.get_transformation_choices(
            key=Transformation.TARGET)
Beispiel #5
0
 def __init__(self, *args, **kwargs):
     super(RulesetEditForm, self).__init__(*args, **kwargs)
     self.fields['action'].choices = Ruleset.get_transformation_choices(key=Transformation.ACTION)
     self.fields['lateral'].choices = Ruleset.get_transformation_choices(key=Transformation.LATERAL)
     self.fields['target'].choices = Ruleset.get_transformation_choices(key=Transformation.TARGET)