Skip to content

Commit be4bc56

Browse files
committed
remove leading slashes from static path
django-debug-toolbar 6.0.0 changed how it collects static file links (django-commons/django-debug-toolbar#2162) for the staticfiles panel so that it uses django's staticfile finders. These finders consider paths with leading slashes as unsafe so they won't load them. The leading slashes are a bug anyway, because they're redundant so I've removed them.
1 parent 8c630c3 commit be4bc56

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

wcivf/apps/administrations/templates/administrations/administrations_for_postcode.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ <h3 class="ds-candidate-name ds-h5">
2828
<img src="{{ candidacy.person.photo_url }}"
2929
alt="Photo of {{ candidacy.person.name }}">
3030
{% else %}
31-
<img src="{% static '/people/images/blank-avatar.png' %}"
31+
<img src="{% static 'people/images/blank-avatar.png' %}"
3232
alt=""
3333
style="background-color: #ddd;">
3434
{% endif %}

wcivf/apps/elections/templates/elections/includes/_people_list_with_lists.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
{% if pp.person.photo_url %}
1515
<img src="{{ pp.person.photo_url }}" alt="{% blocktrans trimmed %}Photo of {{ pp.person.name }}{% endblocktrans %}">
1616
{% else %}
17-
<img src="{% static '/people/images/blank-avatar.png' %}" alt="Blank Head icons created by Freepik - Flaticon" style="background-color: #ddd;">
17+
<img src="{% static 'people/images/blank-avatar.png' %}" alt="Blank Head icons created by Freepik - Flaticon" style="background-color: #ddd;">
1818
{% endif %}
1919
</div>
2020
<div class="ds-not-sidebar">

wcivf/apps/elections/templates/elections/includes/_person_card.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ <h6 class="ds-candidate-name ds-h5">
3838
{% if person_post.person.photo_url %}
3939
<img src="{{ person_post.person.photo_url }}" alt="{% blocktrans trimmed with person_name=person_post.person.name%}Photo of {{ person_name }}{% endblocktrans %}">
4040
{% else %}
41-
<img src="{% static '/people/images/blank-avatar.png' %}" alt="Blank Head icons created by Freepik - Flaticon" style="background-color: #ddd;">
41+
<img src="{% static 'people/images/blank-avatar.png' %}" alt="Blank Head icons created by Freepik - Flaticon" style="background-color: #ddd;">
4242
{% endif %}
4343
</div>
4444
</li>

wcivf/apps/elections/templates/parl_24_winners_full.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ <h3 class="ds-candidate-name ds-h5">
3636
<img src="{{ latest_winner.person.photo_url }}"
3737
alt="{% blocktrans trimmed with person_name=latest_winner.person.name %}Photo of {{ latest_winner.person.name }}{% endblocktrans %}">
3838
{% else %}
39-
<img src="{% static '/people/images/blank-avatar.png' %}"
39+
<img src="{% static 'people/images/blank-avatar.png' %}"
4040
alt="Blank Head icons created by Freepik - Flaticon" style="background-color: #ddd;">
4141
{% endif %}
4242
</div>

wcivf/apps/people/templates/people/includes/_person_intro_card.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ <h2 class="ds-candidate-name ds-h3">
4141
{% if object.photo_url %}
4242
<img src="{{ object.photo_url }}" alt="{% blocktrans trimmed with person=object.name %}profile photo of {{ person }}{% endblocktrans %}">
4343
{% else %}
44-
<img src="{% static '/people/images/blank-avatar.png' %}" alt="Blank Head icons created by Freepik - Flaticon" style="background-color: #ddd;">
44+
<img src="{% static 'people/images/blank-avatar.png' %}" alt="Blank Head icons created by Freepik - Flaticon" style="background-color: #ddd;">
4545
{% endif %}
4646
</div>
4747
</section>

0 commit comments

Comments
 (0)