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

@@ -15,10 +15,14 @@ class StrategyList(LoginRequiredMixin, ObjectList):
list_template = "partials/strategy-list.html"
model = Strategy
context_object_name = "strategies"
context_object_name_singular = "strategy"
title = "Strategies"
title_singular = "Strategy"
page_title = "List of strategies"
list_url_name = "strategies"
list_url_args = ["type"]
submit_url_name = "strategy_create"
@@ -26,6 +30,11 @@ class StrategyCreate(LoginRequiredMixin, ObjectCreate):
model = Strategy
form_class = StrategyForm
context_object_name = "strategies"
context_object_name_singular = "strategy"
list_url_name = "strategies"
list_url_args = ["type"]
submit_url_name = "strategy_create"
@@ -33,8 +42,18 @@ class StrategyUpdate(LoginRequiredMixin, ObjectUpdate):
model = Strategy
form_class = StrategyForm
context_object_name = "strategies"
context_object_name_singular = "strategy"
list_url_name = "strategies"
list_url_args = ["type"]
submit_url_name = "strategy_update"
class StrategyDelete(LoginRequiredMixin, ObjectDelete):
model = Strategy
context_object_name = "strategies"
context_object_name_singular = "strategy"
list_url_name = "strategies"
list_url_args = ["type"]