Pass account ID to trade CRUD helper
This commit is contained in:
parent
633894ae75
commit
cd89b11611
|
@ -10,7 +10,7 @@
|
|||
{% for trade_id in item %}
|
||||
<button
|
||||
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
||||
hx-get="{% url 'trade_action' type=type trade_id=trade_id account_id=object.account_id %}"
|
||||
hx-get="{% url 'trade_action' type=type account_id=object.account_id trade_id=trade_id %}"
|
||||
hx-trigger="click"
|
||||
hx-target="#modals-here"
|
||||
hx-swap="innerHTML"
|
||||
|
|
|
@ -25,7 +25,7 @@ class TradeAction(LoginRequiredMixin, OTPRequiredMixin, ObjectRead):
|
|||
context_object_name = "positions"
|
||||
|
||||
detail_url_name = "trade_action"
|
||||
detail_url_args = ["type", "trade_id"]
|
||||
detail_url_args = ["type", "account_id", "trade_id"]
|
||||
|
||||
def get_object(self, **kwargs):
|
||||
trade_id = kwargs.get("trade_id")
|
||||
|
|
Loading…
Reference in New Issue