You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1015 B
Python

from django.contrib.auth.mixins import LoginRequiredMixin
from mixins.views import ObjectCreate, ObjectDelete, ObjectList, ObjectUpdate
from core.forms import SignalForm
from core.models import Signal
from core.util import logs
log = logs.get_logger(__name__)
class SignalList(LoginRequiredMixin, ObjectList):
list_template = "partials/signal-list.html"
model = Signal
page_title = "List of signals, linked to hooks and strategies"
page_subtitle = (
"Link signals you have defined in Drakdoo to their corresponding hooks."
)
list_url_name = "signals"
list_url_args = ["type"]
submit_url_name = "signal_create"
class SignalCreate(LoginRequiredMixin, ObjectCreate):
model = Signal
form_class = SignalForm
submit_url_name = "signal_create"
class SignalUpdate(LoginRequiredMixin, ObjectUpdate):
model = Signal
form_class = SignalForm
submit_url_name = "signal_update"
class SignalDelete(LoginRequiredMixin, ObjectDelete):
model = Signal