Fix HTMX widgets and tweak display of some titles
This commit is contained in:
parent
781de3c772
commit
e3d57c9aa8
|
@ -220,6 +220,9 @@ class Strategy(models.Model):
|
||||||
price_slippage_percent = models.FloatField(default=2.5)
|
price_slippage_percent = models.FloatField(default=2.5)
|
||||||
trade_size_percent = models.FloatField(default=0.5)
|
trade_size_percent = models.FloatField(default=0.5)
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
verbose_name_plural = "strategies"
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
return self.name
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,8 @@ class ObjectList(ObjectNameMixin, ListView):
|
||||||
|
|
||||||
# Return partials for HTMX
|
# Return partials for HTMX
|
||||||
if self.request.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)
|
return self.render_to_response(context)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ class Positions(LoginRequiredMixin, View):
|
||||||
if type == "page":
|
if type == "page":
|
||||||
type = "modal"
|
type = "modal"
|
||||||
context = {
|
context = {
|
||||||
"title": f"Hooks ({type})",
|
"title": f"Positions ({type})",
|
||||||
"unique": unique,
|
"unique": unique,
|
||||||
"window_content": self.window_content,
|
"window_content": self.window_content,
|
||||||
"list_template": self.list_template,
|
"list_template": self.list_template,
|
||||||
|
@ -75,7 +75,7 @@ class PositionAction(LoginRequiredMixin, View):
|
||||||
if type == "page":
|
if type == "page":
|
||||||
type = "modal"
|
type = "modal"
|
||||||
context = {
|
context = {
|
||||||
"title": f"Hooks ({type})",
|
"title": f"Position info ({type})",
|
||||||
"unique": unique,
|
"unique": unique,
|
||||||
"window_content": self.window_content,
|
"window_content": self.window_content,
|
||||||
"type": type,
|
"type": type,
|
||||||
|
|
Loading…
Reference in New Issue