def index(request):
# Test if the user is authenticated
if request.user.is_authenticated:
# Redirect to main site
return redirect('/list')
else:
# Serve login page
return render(request, 'login/index.html', {
'version' : settings.VERSION,
'authfail' : False,
})
评论列表
文章目录