You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Django 4.2, I encountered an "N+1 query" issue when using {% perms... %} in templates. The problem was caused by the anonymous user, though it worked fine for regular users:
In Django 4.2, I encountered an "N+1 query" issue when using
{% perms... %}
in templates. The problem was caused by the anonymous user, though it worked fine for regular users:django-guardian/guardian/backends.py
Lines 29 to 36 in 77de203
I resolved this by setting
ANONYMOUS_USER_NAME
toNone
. More details can be found in the Django Guardian documentation: https://django-guardian.readthedocs.io/en/stable/configuration.html#anonymous-user-name.The text was updated successfully, but these errors were encountered: