security works by hashing the password entered into the login form, and
comparing the hashed version with the one stored on the database. Hash
functions are quick to run one way, but difficult to reverse, hence it's
difficult to get back the password used.
You can reset a users password in the admin site - login to admin, open
the user up, then use the change password link next to the user's
password field.
This, of course, supposes that the password you've forgotten isn't the
only admin password. If it is, then you could delete the row from the
auth_user database table and do a syncdb - that should prompt you to
create a superuser, if I recall correctly.
HTH,
Tim.
On 30/11/11 18:10, Marc Edwards wrote:
> I am working through some authentication examples.
>
> When I created my first database, I "recall" entering a username and
> password, but entering what I recall was the correct input is not
> authenticating.
>
> Is there an easy way to reset or retrieve the username and password
> that was used to create the object model?
>
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment