Browse Source

postkey/views.py: use wingets in AddForm

pull/1/head
Hidden Z 14 years ago
parent
commit
17db1b07fd
  1. 5
      web/postkey/views.py

5
web/postkey/views.py

@ -11,6 +11,11 @@ class AddForm(ModelForm):
class Meta: class Meta:
model = i2phost model = i2phost
fields = ('name', 'b64hash', 'description') 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): def clean_name(self):
data = self.cleaned_data['name'] data = self.cleaned_data['name']
# convert hostname to lowercase # convert hostname to lowercase

Loading…
Cancel
Save