Fix HTMX widgets and tweak display of some titles

This commit is contained in:
Mark Veidemanis 2022-11-13 13:22:31 +00:00
parent 781de3c772
commit e3d57c9aa8
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
3 changed files with 7 additions and 3 deletions

View File

@ -220,6 +220,9 @@ class Strategy(models.Model):
price_slippage_percent = models.FloatField(default=2.5)
trade_size_percent = models.FloatField(default=0.5)
class Meta:
verbose_name_plural = "strategies"
def __str__(self):
return self.name

View File

@ -90,7 +90,8 @@ class ObjectList(ObjectNameMixin, ListView):
# Return partials for HTMX
if self.request.htmx:
self.template_name = self.list_template
# self.template_name = self.list_template
context["window_content"] = self.list_template
return self.render_to_response(context)

View File

@ -43,7 +43,7 @@ class Positions(LoginRequiredMixin, View):
if type == "page":
type = "modal"
context = {
"title": f"Hooks ({type})",
"title": f"Positions ({type})",
"unique": unique,
"window_content": self.window_content,
"list_template": self.list_template,
@ -75,7 +75,7 @@ class PositionAction(LoginRequiredMixin, View):
if type == "page":
type = "modal"
context = {
"title": f"Hooks ({type})",
"title": f"Position info ({type})",
"unique": unique,
"window_content": self.window_content,
"type": type,