Skip to content

Commit

Permalink
Move the form into the history context dict for rendering rows.
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-schilling committed Feb 9, 2025
1 parent c785d18 commit 842eb67
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions debug_toolbar/panels/history/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def history_sidebar(request):
),
}
return JsonResponse(context)
return HttpResponseBadRequest("Form errors")
return HttpResponseBadRequest(f"Form errors: {form.errors}")


@login_not_required
Expand All @@ -62,14 +62,14 @@ def history_refresh(request):
"history_context": {
"history_stats": toolbar.store.panel(
request_id, "HistoryPanel"
)
),
"form": HistoryStoreForm(
initial={
"request_id": request_id,
"exclude_history": True,
}
),
},
"form": HistoryStoreForm(
initial={
"request_id": request_id,
"exclude_history": True,
}
),
},
),
}
Expand Down

0 comments on commit 842eb67

Please sign in to comment.