Passing 'next' to django login template via urls.py -


i'm trying pass 'next' field login.html template via urls.py file using code

this works fine:

urls((r'^login/$', 'django.contrib.auth.views.login',     {'template_name': 'myapp/login.html'}), 

but don't want redirect after login go '/accounts/profile/' page, want go site root, '/'.

url(r'^login/$', 'django.contrib.auth.views.login',     {'template_name': 'login.html', 'next':'/'}), 

but get

login() got unexpected keyword argument 'next' 

not sure how pass 'next' argument via urls function , can't seem find other solutions, advice?

i able this,

url(r'^login/$', 'django.contrib.auth.views.login',     {'template_name': 'login.html', 'extra_context': {'next':'/'}}), 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -