mirror of
https://github.com/r4sas/py-i2phosts
synced 2025-01-08 22:07:55 +00:00
postkey/views.py: use wingets in AddForm
This commit is contained in:
parent
548ad715aa
commit
17db1b07fd
@ -11,6 +11,11 @@ class AddForm(ModelForm):
|
||||
class Meta:
|
||||
model = i2phost
|
||||
fields = ('name', 'b64hash', 'description')
|
||||
widgets = {
|
||||
'name': forms.TextInput(attrs={'size': '67'}),
|
||||
'b64hash': forms.Textarea(attrs={'rows': '1', 'cols': '100'}),
|
||||
'description': forms.Textarea(attrs={'rows': '2', 'cols': '72'})
|
||||
}
|
||||
def clean_name(self):
|
||||
data = self.cleaned_data['name']
|
||||
# convert hostname to lowercase
|
||||
|
Loading…
Reference in New Issue
Block a user