Use django-crud-mixins for CRUD helpers
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.shortcuts import render
|
||||
from django.views import View
|
||||
|
||||
from core.forms import TradingTimeForm
|
||||
from core.models import Strategy, TradingTime
|
||||
from core.util import logs
|
||||
from core.views import (
|
||||
from mixins.views import (
|
||||
ObjectCreate,
|
||||
ObjectDelete,
|
||||
ObjectList,
|
||||
@@ -13,6 +9,10 @@ from core.views import (
|
||||
ObjectUpdate,
|
||||
)
|
||||
|
||||
from core.forms import TradingTimeForm
|
||||
from core.models import Strategy, TradingTime
|
||||
from core.util import logs
|
||||
|
||||
log = logs.get_logger(__name__)
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ class TrendDirectionList(LoginRequiredMixin, ObjectList):
|
||||
|
||||
|
||||
class TrendDirectionFlip(LoginRequiredMixin, ObjectNameMixin, View):
|
||||
template_name = "partials/notify.html"
|
||||
template_name = "mixins/partials/notify.html"
|
||||
model = Strategy
|
||||
|
||||
def get(self, request, strategy_id, symbol):
|
||||
@@ -62,7 +62,7 @@ class TrendDirectionFlip(LoginRequiredMixin, ObjectNameMixin, View):
|
||||
|
||||
|
||||
class TrendDirectionDelete(LoginRequiredMixin, ObjectNameMixin, View):
|
||||
template_name = "partials/notify.html"
|
||||
template_name = "mixins/partials/notify.html"
|
||||
model = Strategy
|
||||
|
||||
def delete(self, request, strategy_id, symbol):
|
||||
|
||||
Reference in New Issue
Block a user