3

I work on django project that migrate from django social auth to python social auth. Previously new social auth user first name/last name will be saved automatically for first time login.
Now after using python social auth, it's not.

Seems I have to use this setting: SOCIAL_AUTH_USER_MODEL

but

SOCIAL_AUTH_USER_MODEL = 'django.contrib.auth.models.User'

generate error when invoking runserver:

django.core.management.base.CommandError: One or more models did not validate:
default.usersocialauth: 'user' has a relation with model web.models.User, which has either not been installed or is abstract.

Wanted to try subclassing User model in the project

from django.contrib.auth.models import User

class User(User):

but that is not feasible right now.

Also saving manually the name from response data in custom pipeline is prohibited as well.

Really want to know if there any other solution? Thanks.

mhd
  • 4,561
  • 10
  • 37
  • 53
  • social auth works for me without SOCIAL_AUTH_USER_MODEL setting parameter. Also it initializes names. – dani herrera Mar 04 '14 at 09:12
  • The app should fill first/last name automatically for Facebook and `SOCIAL_AUTH_USER_MODEL` is not needed unless you have a custom user model. – omab Mar 04 '14 at 23:24

1 Answers1

2

remove SOCIAL_AUTH_USER_MODEL because you are using Django Default User model.

Bruno Paulino
  • 5,611
  • 1
  • 41
  • 40