Update tables when objects are changed

This commit is contained in:
2022-10-29 14:05:01 +01:00
parent c685b6d25f
commit 6902665ffb
10 changed files with 160 additions and 14 deletions

View File

@@ -63,10 +63,14 @@ class AccountList(LoginRequiredMixin, ObjectList):
list_template = "partials/account-list.html"
model = Account
context_object_name = "accounts"
context_object_name_singular = "account"
title = "Accounts"
title_singular = "Account"
page_title = "List of accounts"
list_url_name = "accounts"
list_url_args = ["type"]
submit_url_name = "account_create"
@@ -74,6 +78,11 @@ class AccountCreate(LoginRequiredMixin, ObjectCreate):
model = Account
form_class = AccountForm
context_object_name = "accounts"
context_object_name_singular = "account"
list_url_name = "accounts"
list_url_args = ["type"]
submit_url_name = "account_create"
@@ -94,8 +103,18 @@ class AccountUpdate(LoginRequiredMixin, ObjectUpdate):
model = Account
form_class = AccountForm
context_object_name = "accounts"
context_object_name_singular = "account"
list_url_name = "accounts"
list_url_args = ["type"]
submit_url_name = "account_update"
class AccountDelete(LoginRequiredMixin, ObjectDelete):
model = Account
context_object_name = "accounts"
context_object_name_singular = "account"
list_url_name = "accounts"
list_url_args = ["type"]