formatting
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
import os
|
||||
import click
|
||||
|
||||
import click
|
||||
from flask import current_app
|
||||
from flask.cli import with_appcontext
|
||||
from werkzeug.exceptions import MethodNotAllowed, NotFound
|
||||
|
||||
from .target_exchange.models import TargetExchange
|
||||
|
||||
|
||||
@click.command()
|
||||
def clean():
|
||||
"""Remove *.pyc and *.pyo files recursively starting at current directory.
|
||||
@@ -39,7 +40,7 @@ def urls(url, order):
|
||||
try:
|
||||
rule, arguments = (
|
||||
current_app.url_map.bind('localhost')
|
||||
.match(url, return_rule=True))
|
||||
.match(url, return_rule=True))
|
||||
rows.append((rule.rule, rule.endpoint, arguments))
|
||||
column_length = 3
|
||||
except (NotFound, MethodNotAllowed) as e:
|
||||
@@ -82,6 +83,7 @@ def urls(url, order):
|
||||
for row in rows:
|
||||
click.echo(str_template.format(*row[:column_length]))
|
||||
|
||||
|
||||
@click.command()
|
||||
@with_appcontext
|
||||
def seed():
|
||||
|
||||
Reference in New Issue
Block a user