mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-08 08:28:15 -04:00
Remove pointless 'list-routes' command
This is superseded by the native 'flask routes' command.
This commit is contained in:
@@ -33,7 +33,6 @@ from werkzeug.local import LocalProxy
|
|||||||
|
|
||||||
from app import proxy_fix, webauthn_server
|
from app import proxy_fix, webauthn_server
|
||||||
from app.asset_fingerprinter import asset_fingerprinter
|
from app.asset_fingerprinter import asset_fingerprinter
|
||||||
from app.commands import setup_commands
|
|
||||||
from app.config import configs
|
from app.config import configs
|
||||||
from app.extensions import antivirus_client, redis_client, zendesk_client
|
from app.extensions import antivirus_client, redis_client, zendesk_client
|
||||||
from app.formatters import (
|
from app.formatters import (
|
||||||
@@ -151,8 +150,6 @@ navigation = {
|
|||||||
|
|
||||||
|
|
||||||
def create_app(application):
|
def create_app(application):
|
||||||
setup_commands(application)
|
|
||||||
|
|
||||||
notify_environment = os.environ['NOTIFY_ENVIRONMENT']
|
notify_environment = os.environ['NOTIFY_ENVIRONMENT']
|
||||||
|
|
||||||
application.config.from_object(configs[notify_environment])
|
application.config.from_object(configs[notify_environment])
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
import click
|
|
||||||
from flask import current_app
|
|
||||||
from flask.cli import with_appcontext
|
|
||||||
|
|
||||||
|
|
||||||
@click.command('list-routes')
|
|
||||||
@with_appcontext
|
|
||||||
def list_routes():
|
|
||||||
"""List URLs of all application routes."""
|
|
||||||
for rule in sorted(current_app.url_map.iter_rules(), key=lambda r: r.rule):
|
|
||||||
print("{:10} {}".format(", ".join(rule.methods - set(['OPTIONS', 'HEAD'])), rule.rule)) # noqa
|
|
||||||
|
|
||||||
|
|
||||||
def setup_commands(application):
|
|
||||||
application.cli.add_command(list_routes)
|
|
||||||
Reference in New Issue
Block a user