Fix HTMX widgets and tweak display of some titles

Mark Veidemanis 2 years ago
parent 781de3c772
commit e3d57c9aa8
Signed by: m
GPG Key ID: 5ACFCEED46C0904F

@ -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

@ -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)

@ -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,

Loading…
Cancel
Save