We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Basically we want to do exactly what django.contrib.auth did with their urls.
django.contrib.auth
This is how the user would create login and logout views with the current version:
url(r'^login/$', views.CustomSocialLoginView.as_view(), name='login'), url(r'^logout/$', partial(auth_views.logout, template_name='logout.html'), name='logout'),
Instead we them to simply go
url(r'', include('django_social_pill.urls'), namespace='social_pill'),
To achieve this, we have to make the following view more generic:
class CustomSocialLoginView(TemplateView): template_name = 'login.html' def get(self, request, *args, **kwargs): if request.user.is_authenticated(): return redirect('users:profile') return super().get(request, *args, **kwargs)
so that we could replace the template and the redirect url with an arbitrary one.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Basically we want to do exactly what
django.contrib.auth
did with their urls.This is how the user would create login and logout views with the current version:
Instead we them to simply go
To achieve this, we have to make the following view more generic:
so that we could replace the template and the redirect url with an arbitrary one.
The text was updated successfully, but these errors were encountered: