custom decorator is not getting called

I have from application.utils import * and def conditional_login_required(view_func) in application/utils.py

but the decorator @conditional_login_required isn’t getting called.

def conditional_login_required(view_func):
    print("settings.TEST_WITHOUT_LOGIN =", settings.TEST_WITHOUT_LOGIN)
    def _wrapped_view(request, *args, **kwargs):
        if not settings.TEST_WITHOUT_LOGIN:
            return ms_identity_web.login_required(view_func)(request, *args, **kwargs)
        return view_func(request, *args, **kwargs)
    return wraps(view_func)(_wrapped_view)

settings.TEST_WITHOUT_LOGIN = never gets printed.

My view :

@conditional_login_required
def index(request):
    return render(request, 'orders.html')

At most, with where you have that print statement, it would get printed once, when the module is imported. It’s not going to be printed on every view.
Check at the very top of your output when you’re starting runserver.

In my test system it shows up immediately before the line
System check identified no issues (0 silenced).

Ah … I can see that it got printed 51 times before System check identified... Thanks