I have this customized views login the problem is that when I have a view with the decorators login the url with next does not work but it redirects me to the page I marked in my customized views
class Login(auth_views.LoginView):
def get_success_url(self):
if self.request.user.is_superuser:
return reverse('dashboard')
else:
return reverse('homepage')