From 77ce677c5b8565902d91f0e585a5b2f9aa123a4f Mon Sep 17 00:00:00 2001 From: chirac Date: Sat, 14 Oct 2017 01:56:14 +0200 Subject: [PATCH] Fix pep8 --- topologie/views.py | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/topologie/views.py b/topologie/views.py index ceb06f0a..12732422 100644 --- a/topologie/views.py +++ b/topologie/views.py @@ -50,7 +50,8 @@ from topologie.forms import EditPortForm, NewSwitchForm, EditSwitchForm from topologie.forms import AddPortForm, EditRoomForm, StackForm from users.views import form -from machines.forms import AliasForm, NewMachineForm, EditMachineForm, EditInterfaceForm, AddInterfaceForm +from machines.forms import AliasForm, NewMachineForm, EditMachineForm +from machines.forms import EditInterfaceForm, AddInterfaceForm from machines.views import generate_ipv4_bft_param from preferences.models import AssoOption, GeneralOption @@ -381,8 +382,15 @@ def new_switch(request): reversion.set_comment("Création") messages.success(request, "Le switch a été créé") return redirect("/topologie/") - i_bft_param = generate_ipv4_bft_param( interface, False ) - return form({'topoform':switch, 'machineform': machine, 'interfaceform': interface, 'domainform': domain, 'i_bft_param': i_bft_param}, 'topologie/switch.html', request) + i_bft_param = generate_ipv4_bft_param(interface, False) + return form({ + 'topoform': switch, + 'machineform': machine, + 'interfaceform': interface, + 'domainform': domain, + 'i_bft_param': i_bft_param + }, 'topologie/switch.html', request) + @login_required @permission_required('infra') @@ -442,8 +450,15 @@ def edit_switch(request, switch_id): ) messages.success(request, "Le switch a bien été modifié") return redirect("/topologie/") - i_bft_param = generate_ipv4_bft_param( interface_form, False ) - return form({'topoform':switch_form, 'machineform': machine_form, 'interfaceform': interface_form, 'domainform': domain_form, 'i_bft_param': i_bft_param}, 'topologie/switch.html', request) + i_bft_param = generate_ipv4_bft_param(interface_form, False) + return form({ + 'topoform': switch_form, + 'machineform': machine_form, + 'interfaceform': interface_form, + 'domainform': domain_form, + 'i_bft_param': i_bft_param + }, 'topologie/switch.html', request) + @login_required @permission_required('infra')