zcash-grant-system/backend/grant/author/commands.py

14 lines
278 B
Python
Raw Normal View History

2018-09-10 09:55:26 -07:00
import click
from flask.cli import with_appcontext
from .models import Author, db
@click.command()
@click.argument('account_address')
@with_appcontext
def create_author(account_address):
author = Author(account_address)
db.session.add(author)
db.session.commit()