I am using the wonderful python-social-auth
package, and more precisely the social-auth-app-django
version since my project is using the Django Framework.
Once the user is registered/logged in via any social backend, I'd like to redirect the user to their own very user profile.
I know I can set a static URL in my settings.py
such as:
SOCIAL_AUTH_LOGIN_REDIRECT_URL = '/logged-in/'
But how can I dynamically redirect the user to their profile given that I know their username/slug?
If I could set variables in the settings.py
it'd be something like:
SOCIAL_AUTH_LOGIN_REDIRECT_URL = '/accounts/<slug:slug>/'
But of course I can't do that.
Is there any way I can achieve what I want?