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.

36 lines
957 B
Python

from django.contrib.auth.mixins import LoginRequiredMixin
from mixins.views import ObjectCreate, ObjectDelete, ObjectList, ObjectUpdate
from two_factor.views.mixins import OTPRequiredMixin
from core.forms import WalletForm
from core.models import Wallet
class WalletList(LoginRequiredMixin, OTPRequiredMixin, ObjectList):
list_template = "partials/wallet-list.html"
model = Wallet
page_title = "List of wallets to send profit to"
list_url_name = "wallets"
list_url_args = ["type"]
submit_url_name = "wallet_create"
class WalletCreate(LoginRequiredMixin, OTPRequiredMixin, ObjectCreate):
model = Wallet
form_class = WalletForm
submit_url_name = "wallet_create"
class WalletUpdate(LoginRequiredMixin, OTPRequiredMixin, ObjectUpdate):
model = Wallet
form_class = WalletForm
submit_url_name = "wallet_update"
class WalletDelete(LoginRequiredMixin, OTPRequiredMixin, ObjectDelete):
model = Wallet