Minor fixes to thingie.
This commit is contained in:
parent
dfc37bf8b8
commit
462b86c583
4 changed files with 15 additions and 11 deletions
|
|
@ -53,6 +53,7 @@ def list_items(model_name):
|
|||
items = [call(Model, 'ui_serialize', r, view=view) or default_serialize(Model, r, view=view)
|
||||
for r in rows]
|
||||
|
||||
if view=="option":
|
||||
return render_template('fragments/_option_fragment.html', options=items)
|
||||
want_html = (request.args.get("view") == "option") or ("HX-Request" in request.headers)
|
||||
if want_html:
|
||||
return render_template("fragments/_option_fragment.html", options=items)
|
||||
return jsonify({"items": items})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue