From 9a68ad7ab8c65504eb6cb0664e9d29f21ac569f6 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 2 Feb 2022 13:09:11 +0100 Subject: [PATCH] fix dictionary style --- ereuse_devicehub/inventory/views.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ereuse_devicehub/inventory/views.py b/ereuse_devicehub/inventory/views.py index b690f1cd..d908e501 100644 --- a/ereuse_devicehub/inventory/views.py +++ b/ereuse_devicehub/inventory/views.py @@ -41,15 +41,17 @@ class DeviceListMix(View): form_new_action = NewActionForm() form_new_allocate = AllocateForm() + self.context = { + 'devices': devices, + 'lots': lots, + 'form_lot_device': LotDeviceForm(), + 'form_tag_device': TagDeviceForm(), + 'form_new_action': form_new_action, + 'form_new_allocate': form_new_allocate, + 'lot': lot, + 'tags': tags + } - self.context = {'devices': devices, - 'lots': lots, - 'form_lot_device': LotDeviceForm(), - 'form_tag_device': TagDeviceForm(), - 'form_new_action': form_new_action, - 'form_new_allocate': form_new_allocate, - 'lot': lot, - 'tags': tags} return self.context @@ -291,8 +293,6 @@ class NewActionView(View): class NewAllocateView(NewActionView, DeviceListMix): methods = ['POST'] - decorators = [login_required] - template_name = 'inventory/device_list.html' _form = AllocateForm def dispatch_request(self):