From 0e8ee9a58fc333c795425c22eff21bb66e3daefa Mon Sep 17 00:00:00 2001 From: Alan Pryor Date: Sat, 3 Aug 2019 12:50:36 -0400 Subject: [PATCH] Cleanup display messages --- commands/seed_command.py | 20 +------------------- manage.py | 2 +- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/commands/seed_command.py b/commands/seed_command.py index ec75d22..a3c7feb 100644 --- a/commands/seed_command.py +++ b/commands/seed_command.py @@ -34,30 +34,12 @@ def seed_thing(cls): }, ] db.session.bulk_insert_mappings(cls, things) -# def seed_widgets(): -# from app.widget import Widget -# widgets = [ -# { -# 'name': 'Pizza Slicer', -# 'purpose': 'Cut delicious pizza', -# }, -# { -# 'name': 'Rolling Pin', -# 'purpose': 'Roll delicious pizza', -# }, -# { -# 'name': 'Pizza Oven', -# 'purpose': 'Bake delicious pizza', -# }, -# ] -# db.session.bulk_insert_mappings(Widget, widgets) - class SeedCommand(Command): """ Seed the DB.""" def run(self): - if input('ARE YOU SURE YOU WANT TO DROP ALL TABLES AND RECREATE? (Y/N)\n' + if input('Are you sure you want to drop all tables and recreate? (y/N)\n' ).lower() == 'y': print('Dropping tables...') db.drop_all() diff --git a/manage.py b/manage.py index a836df0..6812b64 100644 --- a/manage.py +++ b/manage.py @@ -26,7 +26,7 @@ def init_db(): @manager.command def drop_all(): - if input('ARE YOU SURE YOU WANT TO DROP ALL TABLES? (Y/N)\n').lower() == 'y': + if input('Are you sure you want to drop all tables? (y/N)\n').lower() == 'y': print('Dropping tables...') db.drop_all()