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

View File

@@ -0,0 +1,39 @@
"""empty message
Revision ID: aab8050e9c73
Revises:
Create Date: 2025-06-26 10:24:25.760737
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'aab8050e9c73'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('units',
sa.Column('id', sa.Integer(), nullable=False),
sa.PrimaryKeyConstraint('id')
)
op.create_table('user',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('username', sa.String(length=150), nullable=False),
sa.Column('password', sa.String(length=150), nullable=False),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('username')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('user')
op.drop_table('units')
# ### end Alembic commands ###