Skip to content

Commit

Permalink
display forbiden pages without menu for htmx fragment page as well as
Browse files Browse the repository at this point in the history
jquery pages
  • Loading branch information
digitalfox committed Nov 19, 2024
1 parent 0e48209 commit e88bda0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ def tableToCSV(table, filename="data.csv"):

def forbidden(request):
"""When access is denied..."""
if request.META.get('HTTP_X_REQUESTED_WITH') == 'XMLHttpRequest':
if request.META.get('HTTP_X_REQUESTED_WITH') == 'XMLHttpRequest' or request.META.get("HTTP_HX_REQUEST"):
# Ajax request, use stripped forbidden page
template = "core/_access_forbidden.html"
else:
Expand Down

0 comments on commit e88bda0

Please sign in to comment.