Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 17, 2024
1 parent 63b04b5 commit c2f3e94
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions debug_toolbar/_compat.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
try:
from django.contrib.auth.decorators import login_not_required
except ImportError:

def login_not_required(func):
return func
1 change: 1 addition & 0 deletions debug_toolbar/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from debug_toolbar import settings as dt_settings


def require_show_toolbar(view):
@functools.wraps(view)
def inner(request, *args, **kwargs):
Expand Down
2 changes: 2 additions & 0 deletions debug_toolbar/panels/history/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from debug_toolbar.panels.history.forms import HistoryStoreForm
from debug_toolbar.toolbar import DebugToolbar


@login_not_required
@require_show_toolbar
@render_with_toolbar_language
Expand Down Expand Up @@ -37,6 +38,7 @@ def history_sidebar(request):
return JsonResponse(context)
return HttpResponseBadRequest("Form errors")


@login_not_required
@require_show_toolbar
@render_with_toolbar_language
Expand Down

0 comments on commit c2f3e94

Please sign in to comment.