Use django-crud-mixins for CRUD helpers

This commit is contained in:
2023-02-10 20:49:35 +00:00
parent 659b73e695
commit 119acdd734
42 changed files with 47 additions and 880 deletions

View File

@@ -1,11 +1,11 @@
from django.contrib.auth.mixins import LoginRequiredMixin
from django.shortcuts import render
from mixins.views import ObjectList, ObjectRead
from two_factor.views.mixins import OTPRequiredMixin
from core.exchanges import GenericAPIError
from core.models import Account, Trade
from core.util import logs
from core.views import ObjectList, ObjectRead
log = logs.get_logger(__name__)
@@ -93,7 +93,7 @@ class PositionAction(LoginRequiredMixin, OTPRequiredMixin, ObjectRead):
"""
Close a position.
"""
template_name = "partials/notify.html"
template_name = "mixins/partials/notify.html"
account = Account.get_by_id(account_id, request.user)
try:
api_response = account.client.close_position(side, symbol)