From 09f6750c2bfe26359020b83eb8fb7c2dc83388bd Mon Sep 17 00:00:00 2001 From: Kobe Date: Thu, 22 May 2025 20:05:46 +0200 Subject: [PATCH] Update app.py --- app.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) 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