summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-04-28 22:05:12 +0200
committerDan McGee <dan@archlinux.org>2011-04-29 00:53:12 +0200
commit4fd34a78791ebb5645b4ba02bf520e5c9e5a0504 (patch)
tree2dce588237b6ded9b0d93b0d42bb57950698b35b
parentb5be7d6fd60ade6af2fb9379fa43e3e93e60736e (diff)
downloadarchweb-4fd34a78791ebb5645b4ba02bf520e5c9e5a0504.tar.gz
archweb-4fd34a78791ebb5645b4ba02bf520e5c9e5a0504.tar.xz
isotests: move form metaclass to end of definition
To match our style everywhere else. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--isotests/views.py39
1 files changed, 20 insertions, 19 deletions
diff --git a/isotests/views.py b/isotests/views.py
index d988212..e373d06 100644
--- a/isotests/views.py
+++ b/isotests/views.py
@@ -8,6 +8,26 @@ from .models import (Architecture, BootType, Bootloader, ClockChoice,
Test)
class TestForm(forms.ModelForm):
+ iso = forms.ModelChoiceField(queryset=Iso.objects.filter(active=True))
+ filesystem = forms.ModelChoiceField(queryset=Filesystem.objects.all(),
+ help_text="Check the installed system, including fstab.",
+ widget=forms.RadioSelect())
+ modules = forms.ModelMultipleChoiceField(queryset=Module.objects.all(),
+ help_text="", widget=forms.CheckboxSelectMultiple(), required=False)
+ rollback_filesystem = forms.ModelChoiceField(queryset=Filesystem.objects.all(),
+ help_text="If you did a rollback followed by a new attempt to setup " \
+ "your lockdevices/filesystems, select which option you took here.",
+ widget=forms.RadioSelect(), required=False)
+ rollback_modules = forms.ModelMultipleChoiceField(queryset=Module.objects.all(),
+ help_text="If you did a rollback followed b a new attempt to setup " \
+ "your lockdevices/filesystems, select which option you took here.",
+ widget=forms.CheckboxSelectMultiple(), required=False)
+ success = forms.BooleanField(help_text="Only check this if everything went fine. " \
+ "If you you ran into any errors please specify them in the " \
+ "comments.", required=False)
+ website = forms.CharField(label='',
+ widget=forms.TextInput(attrs={'style': 'display:none;'}), required=False)
+
class Meta:
model = Test
fields = ("user_name", "user_email", "iso", "architecture",
@@ -26,25 +46,6 @@ class TestForm(forms.ModelForm):
"bootloader": forms.RadioSelect(),
"modules": forms.CheckboxSelectMultiple(),
}
- success = forms.BooleanField(help_text="Only check this if everything went fine. " \
- "If you you ran into any errors please specify them in the " \
- "comments.", required=False)
- iso = forms.ModelChoiceField(queryset=Iso.objects.filter(active=True))
- filesystem = forms.ModelChoiceField(queryset=Filesystem.objects.all(),
- help_text="Check the installed system, including fstab.",
- widget=forms.RadioSelect())
- modules = forms.ModelMultipleChoiceField(queryset=Module.objects.all(),
- help_text="", widget=forms.CheckboxSelectMultiple(), required=False)
- rollback_filesystem = forms.ModelChoiceField(queryset=Filesystem.objects.all(),
- help_text="If you did a rollback followed by a new attempt to setup " \
- "your lockdevices/filesystems, select which option you took here.",
- widget=forms.RadioSelect(), required=False)
- rollback_modules = forms.ModelMultipleChoiceField(queryset=Module.objects.all(),
- help_text="If you did a rollback followed b a new attempt to setup " \
- "your lockdevices/filesystems, select which option you took here.",
- widget=forms.CheckboxSelectMultiple(), required=False)
- website = forms.CharField(label='',
- widget=forms.TextInput(attrs={'style': 'display:none;'}), required=False)
def add_result(request):
if request.POST: