mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-21 16:27:39 -06:00
Use Python docsctrings
This commit is contained in:
parent
df5054f253
commit
7fa40d7671
@ -5,10 +5,12 @@
|
||||
# Copyright (C) 2013 - 2014, The pgAdmin Development Team
|
||||
# This software is released under the PostgreSQL Licence
|
||||
#
|
||||
# pgAdmin4.py - Main application entry point
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
"""This is the main application entry point for pgAdmin 4. If running on
|
||||
a webserver, this will provide the WSGI interface, otherwise, we're going
|
||||
to start a web server."""
|
||||
|
||||
import os, sys
|
||||
|
||||
# We need to include the root directory in sys.path to ensure that we can
|
||||
|
@ -5,10 +5,11 @@
|
||||
# Copyright (C) 2013 - 2014, The pgAdmin Development Team
|
||||
# This software is released under the PostgreSQL Licence
|
||||
#
|
||||
# pgadmin/__init__.py - Main application startup
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
"""The main pgAdmin module. This handles the application initialisation tasks,
|
||||
such as setup of logging, dynamic loading of modules etc."""
|
||||
|
||||
import inspect, logging, os
|
||||
from flask import Flask
|
||||
|
||||
@ -16,8 +17,8 @@ from flask import Flask
|
||||
import config
|
||||
|
||||
def create_app(app_name=config.APP_NAME):
|
||||
|
||||
# Setup the app object
|
||||
"""Create the Flask application, startup logging and dynamically load
|
||||
additional modules (blueprints) that are found in this directory."""
|
||||
app = Flask(__name__, static_url_path='')
|
||||
app.config.from_object(config)
|
||||
|
||||
|
@ -5,10 +5,9 @@
|
||||
# Copyright (C) 2013 - 2014, The pgAdmin Development Team
|
||||
# This software is released under the PostgreSQL Licence
|
||||
#
|
||||
# utils/views.py - Utility views
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
"""A blueprint module providing utility functions for the application."""
|
||||
MODULE_NAME = 'utils'
|
||||
|
||||
import config
|
||||
@ -23,7 +22,7 @@ blueprint = Blueprint(MODULE_NAME, __name__, static_folder='static', static_url
|
||||
##########################################################################
|
||||
@blueprint.route("/test")
|
||||
def test():
|
||||
|
||||
"""Generate a simple test page to demonstrate that output can be rendered."""
|
||||
output = """
|
||||
Today is <b>%s</b>
|
||||
<br />
|
||||
@ -38,4 +37,6 @@ Today is <b>%s</b>
|
||||
##########################################################################
|
||||
@blueprint.route("/ping")
|
||||
def ping():
|
||||
"""Generate a "PING" response to indicate that the server is alive."""
|
||||
return "PING"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user