From 47e779266bb580051d4e3ab8fbc37aa58dd6411a Mon Sep 17 00:00:00 2001 From: Dave Page Date: Tue, 20 Jan 2015 13:57:51 +0000 Subject: [PATCH] Enable templates and static files in the utils module. Refactor to ease use as a template for other modules in the future. --- web/pgadmin/utils/views.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/pgadmin/utils/views.py b/web/pgadmin/utils/views.py index c6aee5b08..2a4b5872d 100644 --- a/web/pgadmin/utils/views.py +++ b/web/pgadmin/utils/views.py @@ -9,12 +9,14 @@ # ########################################################################## +MODULE_NAME = 'utils' + import config -from flask import Blueprint +from flask import Blueprint, render_template from time import time, ctime # Initialise the module -blueprint = Blueprint('utils', __name__) +blueprint = Blueprint(MODULE_NAME, __name__, static_folder='static', static_url_path='', template_folder='templates', url_prefix='/' + MODULE_NAME) ########################################################################## # A test page