Update web/core/views.py

This commit is contained in:
Joshua Laymon 2025-08-21 01:47:33 +00:00
parent d8b512aaa6
commit 2b3a53f8ff

View File

@ -162,10 +162,15 @@ def search_page(request):
count = len(ids)
if count:
entry = Entry.objects.get(pk=ids[0])
ctx = entry_context(entry, ids)
ctx.update({"from_search": True})
return render(request, "entry_view.html", ctx)
entry = Entry.objects.get(pk=ids[0])
ctx = entry_context(entry, ids)
ctx.update({"from_search": True})
# 🔽 ADD THIS
if request.user.is_staff:
ctx["tts_url"] = reverse("api_tts_for_entry", args=[entry.id])
return render(request, "entry_view.html", ctx)
total = Entry.objects.count()
return render(