From 0cff5fca2c69e211f9f27923ed3f8f94212bbfba Mon Sep 17 00:00:00 2001 From: Dave Page Date: Mon, 26 Jan 2015 16:27:16 +0000 Subject: [PATCH] Restructure templates to avoid conflicts between modules. --- .../browser/templates/browser/body.html | 7 ++++++ .../templates/{ => browser}/index.html | 24 ++++++++++--------- .../templates/{ => browser}/messages.html | 0 web/pgadmin/browser/views.py | 2 +- 4 files changed, 21 insertions(+), 12 deletions(-) create mode 100644 web/pgadmin/browser/templates/browser/body.html rename web/pgadmin/browser/templates/{ => browser}/index.html (79%) rename web/pgadmin/browser/templates/{ => browser}/messages.html (100%) diff --git a/web/pgadmin/browser/templates/browser/body.html b/web/pgadmin/browser/templates/browser/body.html new file mode 100644 index 000000000..62e35f6b5 --- /dev/null +++ b/web/pgadmin/browser/templates/browser/body.html @@ -0,0 +1,7 @@ +
+
+

pgAdmin 4

+

Welcome to pgAdmin 4.

+

Learn more »

+
+
diff --git a/web/pgadmin/browser/templates/index.html b/web/pgadmin/browser/templates/browser/index.html similarity index 79% rename from web/pgadmin/browser/templates/index.html rename to web/pgadmin/browser/templates/browser/index.html index 1c3e6e7ed..7df1d3c57 100644 --- a/web/pgadmin/browser/templates/index.html +++ b/web/pgadmin/browser/templates/browser/index.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% block title %}{{ config.APP_NAME }}{% endblock %} {% block body %} - -
-
-

pgAdmin 4

-

Welcome to pgAdmin 4.

-

Learn more »

-
-
- -{% include 'messages.html' %} +{% include 'browser/body.html' %} +{% include 'browser/messages.html' %} {% endblock %} diff --git a/web/pgadmin/browser/templates/messages.html b/web/pgadmin/browser/templates/browser/messages.html similarity index 100% rename from web/pgadmin/browser/templates/messages.html rename to web/pgadmin/browser/templates/browser/messages.html diff --git a/web/pgadmin/browser/views.py b/web/pgadmin/browser/views.py index ec958eae3..b3876ed99 100644 --- a/web/pgadmin/browser/views.py +++ b/web/pgadmin/browser/views.py @@ -34,4 +34,4 @@ def index(): use_ssl=False, base_url=None) - return render_template('index.html', username=current_user.email) + return render_template(MODULE_NAME + '/index.html', username=current_user.email)