Compare commits
No commits in common. "34d5ce647c2b7e9a8cf1d4108a6b16a741bc19f1" and "25e9751de22861f77362ea6a0a1541f29060fa3a" have entirely different histories.
34d5ce647c
...
25e9751de2
3 changed files with 8 additions and 49 deletions
|
@ -24,26 +24,13 @@ class AccountForm(NummiForm):
|
|||
class CategoryForm(NummiForm):
|
||||
class Meta:
|
||||
model = Category
|
||||
fields = [
|
||||
"name",
|
||||
"icon",
|
||||
]
|
||||
fields = "__all__"
|
||||
|
||||
|
||||
class TransactionForm(NummiForm):
|
||||
class Meta:
|
||||
model = Transaction
|
||||
fields = [
|
||||
"snapshot",
|
||||
"name",
|
||||
"value",
|
||||
"date",
|
||||
"real_date",
|
||||
"category",
|
||||
"trader",
|
||||
"payment",
|
||||
"description",
|
||||
]
|
||||
fields = "__all__"
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
_user = kwargs.get("user")
|
||||
|
@ -57,16 +44,13 @@ class InvoiceForm(NummiForm):
|
|||
|
||||
class Meta:
|
||||
model = Invoice
|
||||
fields = [
|
||||
"name",
|
||||
"file",
|
||||
]
|
||||
fields = "__all__"
|
||||
|
||||
|
||||
class SnapshotForm(NummiForm):
|
||||
class Meta:
|
||||
model = Snapshot
|
||||
fields = ["account", "start_date", "date", "start_value", "value", "file"]
|
||||
fields = "__all__"
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
_user = kwargs.get("user")
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
# Generated by Django 4.1.4 on 2022-12-31 08:53
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("main", "0021_alter_account_options_alter_category_options_and_more"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="account",
|
||||
name="icon",
|
||||
field=models.SlugField(
|
||||
default="building-columns", max_length=64, verbose_name="Icon"
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="category",
|
||||
name="icon",
|
||||
field=models.SlugField(
|
||||
default="folder", max_length=64, verbose_name="Icon"
|
||||
),
|
||||
),
|
||||
]
|
|
@ -33,10 +33,11 @@ class CustomModel(UserModel):
|
|||
class Account(CustomModel):
|
||||
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||
name = models.CharField(max_length=64, default=_("Account"), verbose_name=_("Name"))
|
||||
icon = models.SlugField(
|
||||
icon = models.CharField(
|
||||
max_length=64,
|
||||
default="building-columns",
|
||||
verbose_name=_("Icon"),
|
||||
validators=[validate_slug],
|
||||
)
|
||||
|
||||
def __str__(self):
|
||||
|
@ -78,10 +79,11 @@ class Category(CustomModel):
|
|||
name = models.CharField(
|
||||
max_length=64, default=_("Category"), verbose_name=_("Name")
|
||||
)
|
||||
icon = models.SlugField(
|
||||
icon = models.CharField(
|
||||
max_length=64,
|
||||
default="folder",
|
||||
verbose_name=_("Icon"),
|
||||
validators=[validate_slug],
|
||||
)
|
||||
budget = models.BooleanField(default=True, verbose_name=_("Budget"))
|
||||
|
||||
|
|
Loading…
Reference in a new issue