On 6/27/07, Bryan Veloso <[EMAIL PROTECTED]> wrote:
> At the moment, the game can only read md5 or plain-text passwords, and
> I know that Django has the hash$salt$hash (or something. :P) way of
> doing it. So I can't just copy the password from the User model to the
> account table since the game will choke on that data. So is there any
> way I can store two sets of the password? One in the user model that
> gets copied as md5 or plain-text to my accounts table?

The usual route I go with when trying to extend on the User model is
to create a new model and link it to the User model. For example:

class UserExt(models.Model):
    user = models.ForeignKey(User)
    # ... other fields that you need here

    def __init__(self, user):
        self.user = user
        # ... other stuff that you need to do here

    # ... other methods you need here

In your case, you can just create a UserExt model, add a password_md5
field, set that field when creating or updating a user record and save
the user_ext object.

HTH.
-- 
_nimrod_a_abing_

http://abing.gotdns.com/
http://www.preownedcar.com/

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to