- PlannedExpense model: year, month, concept, amount - CRUD via LiveView in Year page (add form + delete) - Tables grouped by month with totals - Variable expenses line in Year charts includes planned expenses - Month page shows read-only planned expenses table for the month - Month end calculations include planned expenses in totals
34 lines
697 B
Python
34 lines
697 B
Python
# Generated by Django 6.0 on 2026-03-22 09:26
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
initial = True
|
|
|
|
dependencies = []
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="PlannedExpense",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
("year", models.PositiveIntegerField()),
|
|
("month", models.PositiveSmallIntegerField()),
|
|
("concept", models.CharField(max_length=255)),
|
|
("amount", models.DecimalField(decimal_places=2, max_digits=10)),
|
|
],
|
|
options={
|
|
"ordering": ["year", "month", "concept"],
|
|
},
|
|
),
|
|
]
|