db seed command
This commit is contained in:
@@ -5,6 +5,8 @@ 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.
|
||||
@@ -79,3 +81,11 @@ def urls(url, order):
|
||||
|
||||
for row in rows:
|
||||
click.echo(str_template.format(*row[:column_length]))
|
||||
|
||||
@click.command()
|
||||
@with_appcontext
|
||||
def seed():
|
||||
"""Seed the database"""
|
||||
|
||||
TargetExchange.ensure_created("")
|
||||
TargetExchange.ensure_created("webhooks")
|
||||
|
||||
Reference in New Issue
Block a user