Password Field Form

2,108 views
Skip to first unread message

nkulmati

unread,
Nov 2, 2008, 11:58:49 AM11/2/08
to Django users
How come this page:
http://docs.djangoproject.com/en/dev/ref/forms/fields/#module-django.forms.fields
does not contain information about password fields?

How do I create and use a password form field then?

Clearly, django has support for password form fields, since they are
used in the standard Create New User form provided in the library.

Thanks!
Nick.

blitzc...@xairro.com

unread,
Nov 2, 2008, 12:09:53 PM11/2/08
to Django users
Hi Nick,
you can do this by passing the widget parameter to a CharField.

A little example:
password =
forms.CharField(label=_(u'Password'),widget=forms.PasswordInput(render_value=False))

Lukas

On Nov 2, 5:58 pm, nkulmati <kulmatits...@gmail.com> wrote:
> How come this page:http://docs.djangoproject.com/en/dev/ref/forms/fields/#module-django....

Lukas Klein

unread,
Nov 2, 2008, 12:03:36 PM11/2/08
to django...@googlegroups.com
Hi Nick,
you can do this by passing the widget parameter to a CharField.

A little example:
password =
forms
.CharField
(label=_(u'Password'),widget=forms.PasswordInput(render_value=False))

Lukas

Aatif

unread,
Nov 13, 2008, 7:00:53 AM11/13/08
to Django users
yes, it works. I was expecting a forms.Passwordfield() :-)
Reply all
Reply to author
Forward
0 new messages