If a user tries to access a page, I want him to be redirected to the login page, but with a status code 401 (unauthorized). Like this:
if not 'logged_user' in request.session:
return redirect('mqr_admin:login', status=401)
But the redirect()
function doesn't have the status
param as the function render()
has. What should I do?