Implement link groups
This commit is contained in:
36
core/views/linkgroups.py
Normal file
36
core/views/linkgroups.py
Normal file
@@ -0,0 +1,36 @@
|
||||
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 LinkGroupForm
|
||||
from core.models import LinkGroup
|
||||
|
||||
|
||||
class LinkGroupList(LoginRequiredMixin, OTPRequiredMixin, ObjectList):
|
||||
list_template = "partials/linkgroup-list.html"
|
||||
model = LinkGroup
|
||||
page_title = "List of link groups"
|
||||
page_subtitle = "Link groups are used to link aggregators and platforms"
|
||||
|
||||
list_url_name = "linkgroups"
|
||||
list_url_args = ["type"]
|
||||
|
||||
submit_url_name = "linkgroup_create"
|
||||
|
||||
|
||||
class LinkGroupCreate(LoginRequiredMixin, OTPRequiredMixin, ObjectCreate):
|
||||
model = LinkGroup
|
||||
form_class = LinkGroupForm
|
||||
|
||||
submit_url_name = "linkgroup_create"
|
||||
|
||||
|
||||
class LinkGroupUpdate(LoginRequiredMixin, OTPRequiredMixin, ObjectUpdate):
|
||||
model = LinkGroup
|
||||
form_class = LinkGroupForm
|
||||
|
||||
submit_url_name = "linkgroup_update"
|
||||
|
||||
|
||||
class LinkGroupDelete(LoginRequiredMixin, OTPRequiredMixin, ObjectDelete):
|
||||
model = LinkGroup
|
||||
@@ -9,7 +9,7 @@ from core.models import Wallet
|
||||
class WalletList(LoginRequiredMixin, OTPRequiredMixin, ObjectList):
|
||||
list_template = "partials/wallet-list.html"
|
||||
model = Wallet
|
||||
page_title = "List of wallets"
|
||||
page_title = "List of wallets to send profit to"
|
||||
|
||||
list_url_name = "wallets"
|
||||
list_url_args = ["type"]
|
||||
|
||||
Reference in New Issue
Block a user