Skip to content

Commit

Permalink
Use url_for only once for calendar
Browse files Browse the repository at this point in the history
  • Loading branch information
ugyballoons committed Aug 2, 2024
1 parent 7aa1148 commit e48af3d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/lsst/ts/rubintv/templates/camera_parts/calendar.jinja
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% set year_to_display = calendar|last %}
{% set camera_url = url_for('camera', location_name=location.name, camera_name=camera.name) %}
{% if camera.name == "allsky" %}
{% set no_total_seq = True %}
{% endif %}
Expand Down Expand Up @@ -42,7 +43,7 @@
{% if day in calendar[year][month]|list %}
{% set date_str = "{:04}-{:02}-{:02}".format(year, month, day) %}
<a class="day obs"
href="{{ url_for('camera_for_date', location_name=location.name, camera_name=camera.name, date_str=date_str) }}">
href="{{ camera_url }}/date/{{ date_str }}">
<span class="day_num">{{ day }}</span>
{% if not no_total_seq %}
<span class="num_evs">({{ calendar[year][month][day] }})</span>
Expand Down

0 comments on commit e48af3d

Please sign in to comment.