We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2f3e94 commit bf7c5d3Copy full SHA for bf7c5d3
debug_toolbar/_compat.py
@@ -1,6 +1,10 @@
1
try:
2
from django.contrib.auth.decorators import login_not_required
3
except ImportError:
4
-
5
- def login_not_required(func):
6
- return func
+ # For Django < 5.1, copy the current Django implementation
+ def login_not_required(view_func):
+ """
7
+ Decorator for views that allows access to unauthenticated requests.
8
9
+ view_func.login_required = False
10
+ return view_func
0 commit comments