rename commands in the manager

This commit is contained in:
Martin
2016-04-27 10:56:37 +02:00
parent 99ca5b2ff7
commit df5869501a
+4 -4
View File
@@ -5,18 +5,18 @@ from api.models import Designer
manager = Manager(app)
@manager.command
def initdb():
def init_db():
db.create_all()
print("All tables created")
@manager.command
def dropdb():
if prompt_bool("Are you sure you want to lose all your data"):
def drop_db():
if prompt_bool("Are you sure you want to lose all your data?"):
db.drop_all()
print("All tables dropped")
@manager.command
def seed():
def seed_db():
print("Adding sample data")
designer = Designer(name="Martin", path='/martin')
db.session.add(designer)