summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Granberg <zorry@gentoo.org>2017-01-06 18:38:55 +0100
committerMagnus Granberg <zorry@gentoo.org>2017-01-06 18:38:55 +0100
commit8075fca3b427cdedb19c50bf8c8ede5476aaf7ad (patch)
tree6065bda87ed2ee727cb79f614e57714b0a0f2aa2 /python/tbc_www/forms.py
parentUpdate for django 1.10 and fix links for css and js (diff)
downloadtinderbox-cluster-www-8075fca3b427cdedb19c50bf8c8ede5476aaf7ad.tar.gz
tinderbox-cluster-www-8075fca3b427cdedb19c50bf8c8ede5476aaf7ad.tar.bz2
tinderbox-cluster-www-8075fca3b427cdedb19c50bf8c8ede5476aaf7ad.zip
Redone the layout
Diffstat (limited to 'python/tbc_www/forms.py')
-rw-r--r--python/tbc_www/forms.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/python/tbc_www/forms.py b/python/tbc_www/forms.py
new file mode 100644
index 0000000..0a91b3b
--- /dev/null
+++ b/python/tbc_www/forms.py
@@ -0,0 +1,33 @@
+from django import forms
+
+class NameForm(forms.Form):
+ packages_search = forms.CharField(label='Find Packages', max_length=100)
+
+class BugForm(forms.Form):
+ ChoicesComponent = (('Application', 'Application'),
+ ('baselayout', 'baselayout'),
+ ('Core system', 'Core system'),
+ ('Eclasses and Profiles', 'Eclasses and Profiles'),
+ ('Games', 'Games'),
+ ('GCC Porting', 'GCC Porting'),
+ ('GNOME', 'GNOME'),
+ ('Hardened', 'Hardened'),
+ ('Java', 'Java'),
+ ('KDE', 'KDE'),
+ ('SELinux', 'SELinux'),
+ ('Server', 'Server'),
+ ('Unspecified', 'Unspecified'))
+
+ Product = forms.CharField(max_length=100, label='Product')
+ Component = forms.ChoiceField(widget=forms.Select, choices=ChoicesComponent, label='Component')
+ Version = forms.CharField(label='Version')
+ Summary = forms.CharField(label='Summary')
+ Description = forms.CharField(widget=forms.Textarea, label='Description')
+ EmergeInfo = forms.CharField(widget=forms.Textarea, label='emerge --info')
+ AssigendTo = forms.EmailField(label='Assigned To')
+ def __unicode__(self):
+ return u'Product : %s, Component : %s, Version : %s, Summary : %s, Description : %s, EmergeInfo : %s, AssigendTo : %s' % (self.Product, self.Component, self.Version, self.Summary, self.Description, self.EmergeInfo, self.AssigendTo)
+
+class BugzillaUser(forms.Form):
+ BugzillaName = forms.CharField(label='Bugzilla Name', max_length=100)
+ BugzillaPassword = forms.CharField(label='Bugzilla Password', max_length=100)