diff options
Diffstat (limited to 'python/tbc_www/forms.py')
-rw-r--r-- | python/tbc_www/forms.py | 33 |
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) |