X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;ds=sidebyside;f=qcg%2Fforms.py;h=491ad3080969053f6d58d5a8354b771b7c660a4a;hb=9e60afe1703b42d67da48280868bdd7d2e4bbc6e;hp=2708c5e6dacd8c4f6d225f4f7f52d1b92e454129;hpb=169ad8dc3e17a7637808f402cba0fa5667b721c3;p=qcg-portal.git diff --git a/qcg/forms.py b/qcg/forms.py index 2708c5e..491ad30 100644 --- a/qcg/forms.py +++ b/qcg/forms.py @@ -91,7 +91,8 @@ class JobDescriptionForm(forms.Form): APPLICATION_CHOICES = ( CHOICES_PLACEHOLDER, - ('unres32', 'UNRES 3.2'), + ('unres-gab', 'UNRES GAB'), + ('unres-e0ll2y', 'UNRES E0LL2Y'), ) QUEUE_CHOICES = ( @@ -101,8 +102,7 @@ class JobDescriptionForm(forms.Form): ('plgrid-testing', 'plgrid-testing'), ) MODULES_CHOICES = ( - ('plgrid/apps/python', 'plgrid/apps/python'), - ('plgrid/apps/matlab', 'plgrid/apps/matlab'), + CHOICES_PLACEHOLDER, ) PROTOCOL_CHOICES = ( ('', u'Brak'), @@ -127,7 +127,7 @@ class JobDescriptionForm(forms.Form): retmin = forms.IntegerField(label=u"RETMIN", help_text=u"Dolny zakres temparatur dla wymiany replik", min_value=2, initial=250, required=False) retmax = forms.IntegerField(label=u"RETMAX", help_text=u"Górny zakres temperatur dla wymiany replik", min_value=2, initial=450, required=False) - application = forms.ChoiceField(choices=APPLICATION_CHOICES, label=u"Aplikacja", required=False, initial='unres32') # TODO choices + application = forms.ChoiceField(choices=APPLICATION_CHOICES, label=u"Aplikacja", required=False, initial='unres-gab') # TODO choices master_file = forms.CharField(label=u"Plik główny", max_length=500, required=False) executable = forms.CharField(label=u"Plik wykonywalny", max_length=500, required=False) script = forms.CharField(label=u"Skrypt", widget=forms.Textarea(attrs={'rows': 2, 'cols': 40}), required=False) @@ -182,14 +182,15 @@ class JobDescriptionForm(forms.Form): data = super(JobDescriptionForm, self).clean() force_field = data.get('force_field') - if force_field == self.FORCE_FIELD_CHOICES[0]: + + if force_field == u'GAB': data['application'] = [u'unres-gab'] else: data['application'] = [u'unres-e0ll2y'] - if data['master_file']: - self.add_error('master_file', u"Należy podać plik główny") - + '''if data['master_file']: + self.add_error('master_file', u"Należy podać plik główny. :"+data['master_file']) + ''' if data['procs'] and data['nodes']: self.add_error(None, u"Zdefiniuj tylko jedno z pól: liczbę procesów lub topologię węzłów")