Use django-crud-mixins for CRUD helpers
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user