Enable archiving accounts
This commit is contained in:
parent
50ae922a99
commit
cf25fd1826
7 changed files with 42 additions and 1 deletions
|
@ -10,4 +10,5 @@ class AccountForm(NummiForm):
|
|||
"name",
|
||||
"icon",
|
||||
"default",
|
||||
"archived",
|
||||
]
|
||||
|
|
17
nummi/account/migrations/0003_account_archived.py
Normal file
17
nummi/account/migrations/0003_account_archived.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Generated by Django 4.2 on 2024-12-29 09:24
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("account", "0002_alter_account_table"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="account",
|
||||
name="archived",
|
||||
field=models.BooleanField(default=False, verbose_name="Archived"),
|
||||
),
|
||||
]
|
|
@ -15,6 +15,7 @@ class Account(UserModel):
|
|||
verbose_name=_("Icon"),
|
||||
)
|
||||
default = models.BooleanField(default=False, verbose_name=_("Default"))
|
||||
archived = models.BooleanField(default=False, verbose_name=_("Archived"))
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
if self.default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue