diff --git a/topologie/templates/topologie/aff_stacks.html b/topologie/templates/topologie/aff_stacks.html index 34e7b959..586fd90a 100644 --- a/topologie/templates/topologie/aff_stacks.html +++ b/topologie/templates/topologie/aff_stacks.html @@ -30,32 +30,53 @@ with this program; if not, write to the Free Software Foundation, Inc., Details Membres - - {% for stack in stack_list %} - {% for switch in stack.switch_set.all %} - - {% if forloop.first %} - {{stack.name}} - {{stack.stack_id}} - {{stack.details}} - {% endif %} - {{switch}} - {% if forloop.first %} - - - - - {% if is_infra %} - - - - - - - {% endif %} - - {% endif %} - - {% endfor %} - {% endfor %} + + {% for stack in stack_list %} + {% for switch in stack.switch_set.all %} + + + {% if forloop.first %} + {{stack.name}} + {{stack.stack_id}} + {{stack.details}} + {% endif %} + {{switch}} + {% if forloop.first %} + + + + + {% if is_infra %} + + + + + + + {% endif %} + + {% endif %} + + {% empty %} + + {{stack.name}} + {{stack.stack_id}} + {{stack.details}} + Aucun + + + + + {% if is_infra %} + + + + + + + {% endif %} + + {% endfor %} + + {% endfor %} diff --git a/topologie/views.py b/topologie/views.py index f3dedff8..9fe37d6f 100644 --- a/topologie/views.py +++ b/topologie/views.py @@ -211,6 +211,8 @@ def new_stack(request): messages.success(request, "Stack crée") except: messages.error(request, "Cette stack existe déjà") + else: + return redirect('/topologie/index_stack') return form({'topoform':stack}, 'topologie/topo.html', request)