in ur model form add a field called *confirm_password
=CharField(max_length=200)
*
and then in admin u can add this field in fieldset .This will get display in
ur UI
For confirming the password is same or not use *clean* method and get the
value of both the fields i.e password and confirm_password.
On Wed, Nov 4, 2009 at 10:30 AM, Denis Bahati wrote:
> Hi All,
> I have my model which registers users of my system and i created a
> modelForm to make all fields of the model appear as html form which has no
> confirm password. How can i add a field to let users confirm their password?
> Here is my model and modelForm
>
> class User(models.Model):
> title = models.ForeignKey(Title)
> first_name = models.CharField(max_length=100)
> last_name = models.CharField(max_length=100)
> address = models.TextField()
> roles = models.ManyToManyField(Role)
> username = models.CharField(max_length=30)
> password = models.CharField(max_length=30)
> date_added = models.DateTimeField()
>
> class UserForm(ModelForm):
> date_added=forms.DateTimeField()
> password=forms.CharField(label=("Password"),
> widget=forms.PasswordInput)
> class Meta:
> model = User
>
> Thanks in advance.
> Regards
> Denis.
>
> >
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---