Make variables passed to CRUD helpers consistent

This commit is contained in:
2022-12-18 17:37:34 +00:00
parent 246674b03e
commit 8de99c1bcd
8 changed files with 25 additions and 65 deletions

View File

@@ -74,9 +74,6 @@ class TradeList(LoginRequiredMixin, OTPRequiredMixin, ObjectList):
class TradeCreate(LoginRequiredMixin, OTPRequiredMixin, ObjectCreate):
model = Trade
form_class = TradeForm
list_url_name = "trades"
list_url_args = ["type"]
submit_url_name = "trade_create"
def post_save(self, obj):
@@ -87,8 +84,6 @@ class TradeCreate(LoginRequiredMixin, OTPRequiredMixin, ObjectCreate):
class TradeUpdate(LoginRequiredMixin, OTPRequiredMixin, ObjectUpdate):
model = Trade
form_class = TradeForm
list_url_name = "trades"
list_url_args = ["type"]
submit_url_name = "trade_update"
@@ -96,9 +91,6 @@ class TradeUpdate(LoginRequiredMixin, OTPRequiredMixin, ObjectUpdate):
class TradeDelete(LoginRequiredMixin, OTPRequiredMixin, ObjectDelete):
model = Trade
list_url_name = "trades"
list_url_args = ["type"]
class TradeDeleteAll(LoginRequiredMixin, OTPRequiredMixin, ObjectNameMixin, View):
template_name = "partials/notify.html"