fix(library): use {% comment %} for multi-line template comments
Django's `{# #}` syntax only supports single-line comments; multi-line
blocks were rendering as literal text in the search and library detail
templates. Replace them with `{% comment %}...{% endcomment %}` blocks
and add a note explaining the distinction.
This commit is contained in:
@@ -146,11 +146,14 @@
|
|||||||
{% if results_reranked.reranker_used %}
|
{% if results_reranked.reranker_used %}
|
||||||
<span class="badge badge-success">{{ results_reranked.reranker_model|default:"on" }}</span>
|
<span class="badge badge-success">{{ results_reranked.reranker_model|default:"on" }}</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
{# The A/B page always requests rerank=True, so a
|
{% comment %}
|
||||||
negative here is always a skip with a reason —
|
The A/B page always requests rerank=True, so a
|
||||||
surface the reason in a tooltip so the user
|
negative here is always a skip with a reason —
|
||||||
knows *why* the B side fell back to fusion
|
surface the reason in a tooltip so the user
|
||||||
order. #}
|
knows *why* the B side fell back to fusion order.
|
||||||
|
Django's ``{# #}`` comment is single-line only;
|
||||||
|
multi-line blocks must use ``{% comment %}``.
|
||||||
|
{% endcomment %}
|
||||||
<span class="badge badge-warning"
|
<span class="badge badge-warning"
|
||||||
title="{{ results_reranked.reranker_skip_reason|default:'unknown' }}">
|
title="{{ results_reranked.reranker_skip_reason|default:'unknown' }}">
|
||||||
unavailable
|
unavailable
|
||||||
|
|||||||
@@ -81,13 +81,17 @@
|
|||||||
<div class="stat">
|
<div class="stat">
|
||||||
<div class="stat-title">Re-ranked</div>
|
<div class="stat-title">Re-ranked</div>
|
||||||
<div class="stat-value text-lg">
|
<div class="stat-value text-lg">
|
||||||
{# Three-state indicator:
|
{% comment %}
|
||||||
- Yes: re-ranker ran successfully
|
Three-state indicator:
|
||||||
- Skipped (+ tooltip): re-rank was requested but the
|
- Yes: re-ranker ran successfully
|
||||||
pipeline bailed — badge colour is a warning so the
|
- Skipped (+ tooltip): re-rank was requested but the
|
||||||
user knows something didn't work
|
pipeline bailed — badge colour is a warning so the
|
||||||
- Off: user unchecked the re-rank box
|
user knows something didn't work
|
||||||
#}
|
- Off: user unchecked the re-rank box
|
||||||
|
Note: Django's ``{# #}`` comment is single-line only;
|
||||||
|
multi-line blocks must use ``{% comment %}`` or they
|
||||||
|
render as literal text.
|
||||||
|
{% endcomment %}
|
||||||
{% if results.reranker_used %}
|
{% if results.reranker_used %}
|
||||||
<span class="badge badge-success">Yes</span>
|
<span class="badge badge-success">Yes</span>
|
||||||
{% elif results.reranker_skip_reason %}
|
{% elif results.reranker_skip_reason %}
|
||||||
|
|||||||
Reference in New Issue
Block a user