How do I add custom fields to a User when using django-social-auth -



How do I add custom fields to a User when using django-social-auth -

i need add together booleanfield , manytomanyfield users. i'm using django-social-auth. seems utilize 'customuser'. guess that's it's for, how take use?

i need know:

where define these new fields how add together them new user when user created (ie logs in) how query fields afterwards (ie user.mybooleanfield?)

thanks!

create model called customuser or userprofile, whatever want, these fields.

in settings.py add together setting auth_profile_module = "account.userprofile", named model.

in signals social_auth, create sure user has profile, , if not create them when user created.

now anywhere in site can phone call user.get_profile() , you'll have access these fields.

django django-socialauth

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -