Passing 'next' to django login template via urls.py
I'm trying to pass the 'next' field to my login.html template via the
urls.py file using this code
This works fine:
urls((r'^login/$', 'django.contrib.auth.views.login',
{'template_name': 'myapp/login.html'}),
But I don't want my redirect after login to go to the '/accounts/profile/'
page, I want to go to the site root, '/'.
url(r'^login/$', 'django.contrib.auth.views.login',
{'template_name': 'login.html', 'next':'/'}),
but I get
login() got an unexpected keyword argument 'next'
Not sure how to pass the 'next' argument via the urls function and can't
seem to find other solutions, any advice?
No comments:
Post a Comment