X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=qcg%2Fforms.py;h=c1fda14f92d066063c6da6a402a2bd7c5186542b;hb=87c84cec7b5b78b145a61953408b6cadffcd9735;hp=74eec3710a1b0ca89947cefa7ddf7ff57b23d1ec;hpb=30676926ef79a0e6b9bade2ad277c82a322f5f3d;p=qcg-portal.git diff --git a/qcg/forms.py b/qcg/forms.py index 74eec37..c1fda14 100644 --- a/qcg/forms.py +++ b/qcg/forms.py @@ -125,7 +125,7 @@ class JobDescriptionForm(forms.Form): grant = forms.CharField(label=u"Grant", max_length=100, required=False) hosts = forms.MultipleChoiceField(label=u"Host", choices=Host.CHOICES, required=False) - properties = forms.MultipleChoiceField(label=u"Właściwości węzłów", required=False) + properties = forms.CharField(label=u"Właściwości węzłów", required=False) queue = forms.ChoiceField(choices=QUEUE_CHOICES, label=u"Kolejka", required=False) procs = forms.IntegerField(label=u"Liczba procesów", min_value=0, required=False) nodes = forms.CharField(label=u"Topologia węzłów", max_length=10, validators=[nodes_validator], required=False) @@ -136,7 +136,7 @@ class JobDescriptionForm(forms.Form): reservation = forms.CharField(label=u"Rezerwacja", max_length=100, required=False) # TODO grid ftp - input = forms.MultipleChoiceField(label=u"Standardowe wejście", required=False) + input = forms.CharField(label=u"Standardowe wejście", max_length=500, required=False) stage_in = forms.MultipleChoiceField(label=u"Stage in", required=False) # stage_out = forms.MultipleChoiceField(label=u"Stage out", required=False) @@ -167,9 +167,7 @@ class JobDescriptionForm(forms.Form): # accept user defined choices self.fields['queue'].choices += ((data.get('queue'), data.get('queue')), ) self.fields['arguments'].choices += ((v, v) for v in data.getlist('arguments')) - self.fields['properties'].choices += ((v, v) for v in data.getlist('properties')) self.fields['native'].choices += ((v, v) for v in data.getlist('native')) - self.fields['input'].choices += ((v, v) for v in data.getlist('input')) self.fields['stage_in'].choices += ((v, v) for v in data.getlist('stage_in')) # self.fields['stage_out'].choices += ((v, v) for v in data.getlist('stage_out')) @@ -207,6 +205,11 @@ class JobDescriptionForm(forms.Form): def clean_nodes(self): return map(int, self.cleaned_data['nodes'].split(':', 2)) if self.cleaned_data['nodes'] else '' + def clean_input(self): + return 'gsiftp://' + self.cleaned_data['input'] if self.cleaned_data['input'] else '' + + def clean_stage_in(self): + return ['gsiftp://' + item for item in self.cleaned_data['stage_in']] class EnvForm(forms.Form): name = forms.CharField(label=u"Nazwa", max_length=100, validators=[env_name_validator],