Basically, I currently have login/
in urls.py
redirect to the django.contrib.auth.views.login
and that seems to work out fine.
However I'm porting over passwords from a legacy mysql/php site and I believe I should just create a new model profile per http://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-information-about-users. This new model/table will have the old md5 password column, and I'll port over the usernames to the main users table.
How could I change the login method such that I first check if the user has a password in the auth_user
table, and if not then md5 the POST password
field and attempt to match it to my new profile password column, if so save the password in the new auth_user
table by SHA1 encrypting like how the admin does it?