mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-09-03 20:52:57 -05:00
Add automatic browser menu integration for modules.
Modules may now include functions that return lists of menu items that will be included on the main browser window menu. While we're at it, move the test views into a separate module.
This commit is contained in:
@@ -18,22 +18,6 @@ from time import time, ctime
|
||||
# Initialise the module
|
||||
blueprint = Blueprint(MODULE_NAME, __name__, static_folder='static', static_url_path='', template_folder='templates', url_prefix='/' + MODULE_NAME)
|
||||
|
||||
##########################################################################
|
||||
# A test page
|
||||
##########################################################################
|
||||
@blueprint.route("/test")
|
||||
@login_required
|
||||
def test():
|
||||
"""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
|
||||
|
||||
##########################################################################
|
||||
# A special URL used to "ping" the server
|
||||
##########################################################################
|
||||
|
||||
Reference in New Issue
Block a user