django-class-based-auth-views icon indicating copy to clipboard operation
django-class-based-auth-views copied to clipboard

Preserve redirect URL across requests

Open niran opened this issue 11 years ago • 0 comments

django.contrib.auth.views.login passes the success URL to the context. LoginView doesn't. Adding a get_context_data method to my subclass with

context[self.redirect_field_name] = self.get_success_url()

preserves the behavior I had with the stock login.

niran avatar Nov 13 '13 23:11 niran