Update web/core/views.py
This commit is contained in:
parent
d8b512aaa6
commit
2b3a53f8ff
@ -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(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user