Verified Commit 7ca00986 authored by Jonathan Wiltshire's avatar Jonathan Wiltshire Committed by Mattia Rizzolo
Browse files

Use the static temlate tag, not STATIC_URL



STATIC_URL has not been advocated by Django for many years now. The
static template tag deals properly with multiple static providers and
those which are not just local files.

Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parent 2710c64f
{% load static %}
{% load i18n %}
{% for identity in identities %}
......@@ -6,7 +7,7 @@
{% with identity.get_provider as provider %}
{% if identity.profile %}<a href="{{identity.profile}}">{% endif %}
{% if provider.icon %}
<img style="vertical-align: text-top; height: 1em" class="mr-2" src="{{STATIC_URL}}{{provider.icon}}"></img>
<img style="vertical-align: text-top; height: 1em" class="mr-2" src="{% static provider.icon %}"></img>
{% else %}
<span class="mr-2 fa fa-sign-in"></span>
{% endif %}
......
{% extends base_template %}
{% load static %}
{% load i18n %}
{% block content %}
......@@ -25,7 +26,7 @@
<li class="row">
<div class="btn btn-info btn-lg disabled col-sm-6">
{% if provider.icon %}
<img style="vertical-align: text-top; height: 1em" class="mr-2" src="{{STATIC_URL}}{{provider.icon}}"></img>
<img style="vertical-align: text-top; height: 1em" class="mr-2" src="{% static provider.icon %}"></img>
{% else %}
<span class="mr-2 fa fa-sign-in"></span>
{% endif %}
......@@ -89,7 +90,7 @@
<li class="row mx-0 my-2">
<a class="btn btn-primary btn-lg col-md-6" href="{{provider.get_authorization_url}}" role="button">
{% if provider.icon %}
<img style="vertical-align: text-top; height: 1em" class="mr-2" src="{{STATIC_URL}}{{provider.icon}}"></img>
<img style="vertical-align: text-top; height: 1em" class="mr-2" src="{% static provider.icon %}"></img>
{% else %}
<span class="mr-2 fa fa-sign-in"></span>
{% endif %}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment