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