On Tue, 2006-02-21 at 23:52 +0100, gabor wrote:

> i wanted to have in the user-manager form a way to do the normal 
> password-thing (2 password fields, check if they are equal, and so on).
> 
> so, i created a page-template, put it to the right place so that it 
> overrides the django-users-manager template,
> and started some javascript hacking :)
> 
> i added the password fields to that page, and used javascript to:
> -when submitting: check if the 2 passwords are equal, and if they are, 
> calculate the password-has, set it into the password-hash input-field 
> (which i made hidden), and allow the form to be submitted. otherwise do 
> not allow the form to be submitted.

Don't do that.  Calculate the password hash on the server side.

You're trying to do something in the template that ought to be done in
the view.  So write a view that does what you want, rather than trying
to use client-side code to generate stuff to be sent to an existing
view.

-- 
+----------------------------------------------------------------+
| Jason F. McBrayer                         [EMAIL PROTECTED]  |
|  "If you wish to make Pythocles wealthy, don't give him more   |
|   money; rather, reduce his desires."            -- Epicurus   |

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to