Hello?我试图在django登录后将特定用户重定向到自定义页面。管理员将被定向到他们通常的管理界面,而这个特定的用户将转到他们自己的自定义页面。 我已经在我的意见登录后将用户重定向到基于用户名的自定义url Django
def custLogin(request):
if request.user.username == '***':
return HttpResponseRedirect('http://********************.html')
else:
return login(request,template_name='login.html')
我已经指出在urls.py账户/登录网址custLogin如下
(r'^accounts/login/', custLogin),
编写这些代码并把它放在我却不断收到错误
Caught NoReverseMatch while rendering: Reverse for 'django.contrib.auth.views.login' with arguments '()' and keyword arguments '{}' not found.
任何指针?