如何在django settings.py中更改'login_required'的默认重定向

时间:2010-12-13 22:48:39

标签: python django redirect login-required

这是我的代码:

@login_required
def signin_complete(request):
    return render_to_response('socialauth/signin_complete.html', context_instance=RequestContext(request))

当我运行此视图时,它始终重定向到/accounts/login/?next=/

如何将其更改为/other/other

感谢

2 个答案:

答案 0 :(得分:2)

答案 1 :(得分:0)

@login_required(login_url='/other/other')