Rename attribute `_form` --> `form_class`

This commit is contained in:
Santiago L 2022-02-08 11:52:30 +01:00
parent e15e457481
commit b103a1a51d
1 changed files with 4 additions and 4 deletions

View File

@ -290,10 +290,10 @@ class TagUnlinkDeviceView(View):
class NewActionView(View):
methods = ['POST']
decorators = [login_required]
_form = NewActionForm
form_class = NewActionForm
def dispatch_request(self):
self.form = self._form()
self.form = self.form_class()
if self.form.validate_on_submit():
instance = self.form.save()
@ -313,10 +313,10 @@ class NewActionView(View):
class NewAllocateView(NewActionView, DeviceListMix):
methods = ['POST']
_form = AllocateForm
form_class = AllocateForm
def dispatch_request(self):
self.form = self._form()
self.form = self.form_class()
if self.form.validate_on_submit():
instance = self.form.save()