From 9e8d930a3bab1c9ae7177002419dba11345788c3 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 1 Oct 2017 20:16:05 +0200 Subject: [PATCH] Refactor messages to includes/_messages.html --- hosting/templates/hosting/includes/_messages.html | 8 ++++++++ hosting/templates/hosting/login.html | 8 +------- 2 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 hosting/templates/hosting/includes/_messages.html diff --git a/hosting/templates/hosting/includes/_messages.html b/hosting/templates/hosting/includes/_messages.html new file mode 100644 index 00000000..13500fdb --- /dev/null +++ b/hosting/templates/hosting/includes/_messages.html @@ -0,0 +1,8 @@ +{% if messages %} + +{% endif %} \ No newline at end of file diff --git a/hosting/templates/hosting/login.html b/hosting/templates/hosting/login.html index 82056d2f..eda3fffa 100644 --- a/hosting/templates/hosting/login.html +++ b/hosting/templates/hosting/login.html @@ -16,13 +16,7 @@

{% trans "Login"%}

- {% if messages %} -
    - {% for message in messages %} -
  • {{ message }}
  • - {% endfor %} -
- {% endif %} + {% include 'hosting/includes/_messages.html' %}
{% csrf_token %} {% for field in form %}