Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple question - template use #50

Closed
uaimax opened this issue Oct 8, 2013 · 3 comments
Closed

Simple question - template use #50

uaimax opened this issue Oct 8, 2013 · 3 comments

Comments

@uaimax
Copy link

uaimax commented Oct 8, 2013

Sorry, maybe it's a dumb question.
But after /done/, after everything ok, how can I get the user details, something like: {{ user.social_auth.gender }}. Thank you!

@omab
Copy link
Owner

omab commented Oct 8, 2013

Any extra data defined on by *_EXTRA_DATA setting is stored in the extra_data attribute of the social model which can be accessible like this:

# Assuming Facebook as social account
social = user.social_auth.filter(provider='facebok')[0]
social.extra_data['gender']

@omab omab closed this as completed Oct 8, 2013
@uaimax
Copy link
Author

uaimax commented Oct 8, 2013

Thank you very much. To make the same thing on template I have to create a new templatetag??

@omab
Copy link
Owner

omab commented Oct 8, 2013

Probably, depends on your project, if it's used on a single view, then just do it in the view, otherwise write a templatetag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants