[Answer]-Django (mod_wsgi) – HttpBasicAuthentication using view decorator – AttributeError

1👍

The decorator takes an argument, so you must call the decorator, even if you do not provide the argument realm and let it default to “”.

@logged_in_or_basicauth()
def test_handler(request):
    return HttpResponse("Test!")

Leave a comment