I am extending UserCreationForm
and have added
username=forms.CharField(max_length=30, widget=forms.TextInput(attrs={'size':'80'}))
but the username field width does not change. How can I increase it?
I am extending UserCreationForm
and have added
username=forms.CharField(max_length=30, widget=forms.TextInput(attrs={'size':'80'}))
but the username field width does not change. How can I increase it?
Try specifying widgets in the form, as in the following example:
models.py
admin.py
forms.py
As alternative, you can use the following:
forms.py
Since 1.7 you can solve it like this:
admin.py