Update web/core/views.py
This commit is contained in:
parent
2b3a53f8ff
commit
55e376c638
@ -162,15 +162,15 @@ def search_page(request):
|
|||||||
count = len(ids)
|
count = len(ids)
|
||||||
|
|
||||||
if count:
|
if count:
|
||||||
entry = Entry.objects.get(pk=ids[0])
|
entry = Entry.objects.get(pk=ids[0])
|
||||||
ctx = entry_context(entry, ids)
|
ctx = entry_context(entry, ids)
|
||||||
ctx.update({"from_search": True})
|
ctx.update({"from_search": True})
|
||||||
|
|
||||||
# 🔽 ADD THIS
|
# 🔽 ADD THIS
|
||||||
if request.user.is_staff:
|
if request.user.is_staff:
|
||||||
ctx["tts_url"] = reverse("api_tts_for_entry", args=[entry.id])
|
ctx["tts_url"] = reverse("api_tts_for_entry", args=[entry.id])
|
||||||
|
|
||||||
return render(request, "entry_view.html", ctx)
|
return render(request, "entry_view.html", ctx)
|
||||||
|
|
||||||
total = Entry.objects.count()
|
total = Entry.objects.count()
|
||||||
return render(
|
return render(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user