def __init__(self, *args, **kwargs):
super(TitleField, self).__init__(*args, **kwargs)
self.required = True
- self.widget = forms.TextInput(attrs={'size' : 70, 'autocomplete' : 'off'})
self.max_length = 255
+ self.widget = forms.TextInput(attrs={'size' : 70, 'autocomplete' : 'off', 'maxlength' : self.max_length})
self.label = _('title')
self.help_text = _('please enter a descriptive title for your question')
self.initial = ''
if user.date_of_birth is not None:
self.fields['birthday'].initial = user.date_of_birth
- else:
- self.fields['birthday'].initial = '1990-01-01'
+
self.fields['about'].initial = user.about
self.user = user