code now follows the PEP8 standard

This commit is contained in:
Martin
2016-04-28 16:24:38 +02:00
parent df5869501a
commit ead66c2561
6 changed files with 67 additions and 56 deletions
+13 -10
View File
@@ -4,24 +4,27 @@ from api.models import Designer
manager = Manager(app)
@manager.command
def init_db():
db.create_all()
print("All tables created")
db.create_all()
print("All tables created")
@manager.command
def drop_db():
if prompt_bool("Are you sure you want to lose all your data?"):
db.drop_all()
print("All tables dropped")
if prompt_bool("Are you sure you want to lose all your data?"):
db.drop_all()
print("All tables dropped")
@manager.command
def seed_db():
print("Adding sample data")
designer = Designer(name="Martin", path='/martin')
db.session.add(designer)
db.session.commit()
print("Adding sample data")
designer = Designer(name="Martin", path='/martin')
db.session.add(designer)
db.session.commit()
if __name__ == '__main__':
manager.run()
manager.run()