From 99f12df748f56926bf2537efcadfe777d2d4fde0 Mon Sep 17 00:00:00 2001 From: Ymage Date: Wed, 20 May 2020 00:03:36 +0200 Subject: [PATCH] Add url_for() for static assets --- powerdnsadmin/templates/base.html | 10 +++++----- powerdnsadmin/templates/email_confirmation.html | 2 +- powerdnsadmin/templates/login.html | 2 +- powerdnsadmin/templates/register.html | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/powerdnsadmin/templates/base.html b/powerdnsadmin/templates/base.html index 8fadf98..817374a 100644 --- a/powerdnsadmin/templates/base.html +++ b/powerdnsadmin/templates/base.html @@ -4,12 +4,12 @@ {% block head %} - + {% block title %}{{ SITE_NAME }}{% endblock %} {% if OFFLINE_MODE %} - - + + {% else %} @@ -29,7 +29,7 @@ {% if OFFLINE_MODE %} - {% set gravatar_url = "/static/img/gravatar.png" %} + {% set gravatar_url = "{{ url_for('static', filename='img/gravatar.png') }}" %} {% else %} {% set gravatar_url = current_user.email|email_to_gravatar_url(size=80) %} {% endif %} @@ -131,7 +131,7 @@
  • Users -
  • +
  • Settings diff --git a/powerdnsadmin/templates/email_confirmation.html b/powerdnsadmin/templates/email_confirmation.html index 8f94773..9a26c14 100644 --- a/powerdnsadmin/templates/email_confirmation.html +++ b/powerdnsadmin/templates/email_confirmation.html @@ -5,7 +5,7 @@ Email confirmation - {{ SITE_NAME }} - + {% assets "css_login" -%} diff --git a/powerdnsadmin/templates/login.html b/powerdnsadmin/templates/login.html index fd6d322..ffa57a9 100644 --- a/powerdnsadmin/templates/login.html +++ b/powerdnsadmin/templates/login.html @@ -5,7 +5,7 @@ Log In - {{ SITE_NAME }} - + {% assets "css_login" -%} diff --git a/powerdnsadmin/templates/register.html b/powerdnsadmin/templates/register.html index 8b0de6b..aa98240 100644 --- a/powerdnsadmin/templates/register.html +++ b/powerdnsadmin/templates/register.html @@ -5,7 +5,7 @@ Register - {{ SITE_NAME }} - + {% assets "css_login" -%}