Update tables when objects are changed
This commit is contained in:
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user