fix dictionary style
This commit is contained in:
parent
bd5ab802cd
commit
9a68ad7ab8
|
@ -41,15 +41,17 @@ class DeviceListMix(View):
|
||||||
form_new_action = NewActionForm()
|
form_new_action = NewActionForm()
|
||||||
form_new_allocate = AllocateForm()
|
form_new_allocate = AllocateForm()
|
||||||
|
|
||||||
|
self.context = {
|
||||||
self.context = {'devices': devices,
|
'devices': devices,
|
||||||
'lots': lots,
|
'lots': lots,
|
||||||
'form_lot_device': LotDeviceForm(),
|
'form_lot_device': LotDeviceForm(),
|
||||||
'form_tag_device': TagDeviceForm(),
|
'form_tag_device': TagDeviceForm(),
|
||||||
'form_new_action': form_new_action,
|
'form_new_action': form_new_action,
|
||||||
'form_new_allocate': form_new_allocate,
|
'form_new_allocate': form_new_allocate,
|
||||||
'lot': lot,
|
'lot': lot,
|
||||||
'tags': tags}
|
'tags': tags
|
||||||
|
}
|
||||||
|
|
||||||
return self.context
|
return self.context
|
||||||
|
|
||||||
|
|
||||||
|
@ -291,8 +293,6 @@ class NewActionView(View):
|
||||||
|
|
||||||
class NewAllocateView(NewActionView, DeviceListMix):
|
class NewAllocateView(NewActionView, DeviceListMix):
|
||||||
methods = ['POST']
|
methods = ['POST']
|
||||||
decorators = [login_required]
|
|
||||||
template_name = 'inventory/device_list.html'
|
|
||||||
_form = AllocateForm
|
_form = AllocateForm
|
||||||
|
|
||||||
def dispatch_request(self):
|
def dispatch_request(self):
|
||||||
|
|
Reference in a new issue