Atma
Atma

Reputation: 29767

how to remember user name and password in django

I want to prepopulate a user's user name and password at login like this:

enter image description here

I'm pretty sure I wouldn't save the password to a cookie.

How else would I accomplish this?

Upvotes: 0

Views: 528

Answers (1)

Daniel Roseman
Daniel Roseman

Reputation: 599580

No, you really, really don't want to do this. There is absolutely no good reason to prepopulate a user's password field

Of course, you can keep them logged in for as long as you like, that's simply a matter of setting the session expiry. But what would be the benefit of prepopulating their password? Just don't do it.

Upvotes: 3

Related Questions