mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-30 12:33:52 -06:00
36 lines
1.2 KiB
Python
36 lines
1.2 KiB
Python
##########################################################################
|
|
#
|
|
# pgAdmin 4 - PostgreSQL Tools
|
|
#
|
|
# Copyright (C) 2013 - 2015, The pgAdmin Development Team
|
|
# This software is released under the PostgreSQL Licence
|
|
#
|
|
##########################################################################
|
|
|
|
"""A blueprint module providing utility functions for the application."""
|
|
MODULE_NAME = 'test'
|
|
|
|
import config
|
|
from flask import Blueprint, render_template
|
|
from flask.ext.security import login_required
|
|
from time import time, ctime
|
|
|
|
# Initialise the module
|
|
blueprint = Blueprint(MODULE_NAME, __name__, static_folder='static', template_folder='templates', url_prefix='/' + MODULE_NAME)
|
|
|
|
##########################################################################
|
|
# A test page
|
|
##########################################################################
|
|
@blueprint.route("/generated")
|
|
@login_required
|
|
def generated():
|
|
"""Generate a simple test page to demonstrate that output can be rendered."""
|
|
output = """
|
|
Today is <b>%s</b>
|
|
<br />
|
|
<i>This is Flask-generated HTML.</i>
|
|
<br /><br />
|
|
<a href="http://www.pgadmin.org/">%s v%s</a>""" % (ctime(time()), config.APP_NAME, config.APP_VERSION)
|
|
|
|
return output
|