Skip to content

Commit

Permalink
Remove call to is_ajax() which is removed in Django 4
Browse files Browse the repository at this point in the history
  • Loading branch information
sde1000 committed Jan 16, 2024
1 parent 3f72930 commit bd89a64
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions quicktill/tillweb/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,6 @@ def querylog_callback(_conn, _cur, query, params, *_):
'version': version,
'money': money,
}
if t.endswith(".ajax"):
# AJAX content typically is not a fully-formed HTML document.
# If requested in a non-AJAX context, add a HTML container.
if not request.is_ajax():
defaults['ajax_content'] = 'tillweb/' + t
t = 'non-ajax-container.html'
defaults.update(d)
return render(request, 'tillweb/' + t, defaults)
except OperationalError as oe:
Expand Down Expand Up @@ -2356,7 +2350,7 @@ def plu(request, info, pluid):
p.altprice3 = cd['altprice3']
td.s.commit()
messages.success(
request, "Price lookup '{p.description}' updated.")
request, f"Price lookup '{p.description}' updated.")
return HttpResponseRedirect(p.get_absolute_url())
else:
form = PLUForm(initial=initial)
Expand Down

0 comments on commit bd89a64

Please sign in to comment.