This is the exmaple code that works, or any other if statements
def login_page(request): if request.user.is_authenticated: return redirect(\'home\