diff --git a/app.py b/app.py index 9ef9ca4..426dc7e 100644 --- a/app.py +++ b/app.py @@ -1142,16 +1142,4 @@ def seed_db(): description=plant['description'], care_guide=plant['care_guide'] )) - db.session.commit() - -if __name__ == '__main__': - with app.app_context(): - db.create_all() - # Create an admin user if not exists - if not User.query.filter_by(username='admin').first(): - admin = User(username='admin') - admin.set_password('admin123') # Change this password after first login! - db.session.add(admin) - db.session.commit() - seed_db() - app.run(debug=True) \ No newline at end of file + db.session.commit() \ No newline at end of file