Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » Converting from Wordpress, upgrading users. [RSS Feed]

#1 Jan. 15, 2011 16:03:54

Sean B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Converting from Wordpress, upgrading users.


I am migrating a site from Wordpress to Django and I need the old
username and passwords to keep working. I first create auth.User
objects for all Wordpress users. Wordpress' login username does not
conform to Django's so I need to fix some of the usernames during
migration.

I then store Wordpress Credentials wp_user_login, wp_user_pass,
fixed_username (True is i need to fix there username during migration)
and a FK to the new auth.User in a separate table. My custom auth
backend will look up the Credentials by wp_user_login, then check the
password (hashing it with the same algorithm that Wordpress uses)
against wp_user_pass.

If the password hashes match and and fixed_username is False I can
update the auth.User's password and the upgrade is complete.

If fixed_username is True I need to provide an additional step of
having the User verify they like there new username, or provide a new
one. And then the upgrade is complete.

I would like to not have to recreate all of
django.contrib.auth.views.login to get this workflow working, but i
can figure out how to redirect to the "verify fixed username" page.

Anyone solve this before?

--
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+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Jan. 15, 2011 21:11:05

Mike D.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Converting from Wordpress, upgrading users.


On 16/01/2011 3:03am, Sean Brant wrote:I am migrating a site from Wordpress to Django and I need the old
username and passwords to keep working.Maybe you can write an auth backend to continue using the Wordpress auth?http://docs.djangoproject.com/en/dev/topics/auth/#writing-an-authentication-backendIf so, you could duplicate the userids and passwords in the django authbackend in parallel as each user logs in.I first create auth.Userobjects for all Wordpress users. Wordpress' login username does not
conform to Django's so I need to fix some of the usernames during
migration.If you can figure out the name rules you might be able to fix them onthe fly and notify the users that their userid has now been adjusted.Just a thought

MikeI then store Wordpress Credentials wp_user_login, wp_user_pass,
fixed_username (True is i need to fix there username during migration)
and a FK to the new auth.User in a separate table. My custom auth
backend will look up the Credentials by wp_user_login, then check the
password (hashing it with the same algorithm that Wordpress uses)
against wp_user_pass.

If the password hashes match and and fixed_username is False I can
update the auth.User's password and the upgrade is complete.

If fixed_username is True I need to provide an additional step of
having the User verify they like there new username, or provide a new
one. And then the upgrade is complete.

I would like to not have to recreate all of
django.contrib.auth.views.login to get this workflow working, but i
can figure out how to redirect to the "verify fixed username" page.

Anyone solve this before?--
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+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

  • Root
  • » Django
  • » Converting from Wordpress, upgrading users. [RSS Feed]

Board footer

Moderator control

Enjoy the 17th of August
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support