Initial commit: Flask calorie counter app setup

Add base Flask application with user authentication, SQLAlchemy models for users, units, and food items, admin blueprint, and basic templates. Includes database migration setup, login form, and seed script for initial user creation.
This commit is contained in:
2025-06-26 14:19:09 +02:00
parent b9f2c420ef
commit b498f3693a
19 changed files with 531 additions and 0 deletions

18
application/__init__.py Normal file
View File

@@ -0,0 +1,18 @@
from flask import Flask
from flask_login import LoginManager # type: ignore
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from application.admin.routes import admin_bp
app = Flask(__name__) # Init Flask app
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///data.db"
db = SQLAlchemy(app=app) # Init SQLAlchemy
migrate = Migrate(app=app, db=db) # Init Migration
login_manager = LoginManager(app=app) # Init login manager
# Register blueprints
app.register_blueprint(admin_bp)