This commit is contained in:
2025-05-22 20:25:38 +02:00
parent 09f6750c2b
commit ce03fbf12f
529 changed files with 3353 additions and 3312 deletions

7
app.py
View File

@@ -1,5 +1,6 @@
from flask import Flask, render_template, request, redirect, url_for, flash, session
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from datetime import datetime
from werkzeug.security import generate_password_hash, check_password_hash
from werkzeug.utils import secure_filename
@@ -16,6 +17,7 @@ app.config['MAX_CONTENT_LENGTH'] = 2 * 1024 * 1024 # 2MB max file size
os.makedirs(app.config['UPLOAD_FOLDER'], exist_ok=True)
db = SQLAlchemy(app)
migrate = Migrate(app, db)
# Database Models
class User(db.Model):
@@ -1142,4 +1144,7 @@ def seed_db():
description=plant['description'],
care_guide=plant['care_guide']
))
db.session.commit()
db.session.commit()
if __name__ == "__main__":
app.run(debug=True)