I believe you can set this via a built-in widget's attrs:
somefield = forms.CharField(
widget=forms.TextInput(attrs={'readonly':'readonly'}))
On Monday, November 17, 2014 1:48:44 AM UTC-5, Frankline wrote:
>
> Hi all,
>
> I'm running Django 1.7 and Python 3.4. I'm trying to make the username
Hi all,
I'm running Django 1.7 and Python 3.4. I'm trying to make the username
field of my custom model to be read-only. I think this is usually set in
the form. Below is what I currently have in my *forms.py*
class AuthUserChangeForm(UserChangeForm):
"""
A form for updating users. Includ
2 matches
Mail list logo