From 99d777280257475def0edef5310ed5d19b45cbee Mon Sep 17 00:00:00 2001 From: guimoz Date: Tue, 1 Aug 2017 13:46:29 +0200 Subject: [PATCH] =?UTF-8?q?Utilisation=20du=20pseudo=20comme=20proposition?= =?UTF-8?q?=20par=20d=C3=A9faut=20DNS=20+=20Remplacement=20=C3=A0=20la=20v?= =?UTF-8?q?ol=C3=A9e=20de=20l'underscore=20par=20un=20trait=20d'union?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machines/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/machines/views.py b/machines/views.py index 6e0eb46b..45723df4 100644 --- a/machines/views.py +++ b/machines/views.py @@ -90,7 +90,7 @@ def new_machine(request, userid): machine = NewMachineForm(request.POST or None) interface = AddInterfaceForm(request.POST or None, infra=request.user.has_perms(('infra',))) nb_machine = Interface.objects.filter(machine__user=userid).count() - domain = DomainForm(request.POST or None, name_user=user.surname, nb_machine=nb_machine) + domain = DomainForm(request.POST or None, name_user=user.pseudo.replace('_','.'), nb_machine=nb_machine) if machine.is_valid() and interface.is_valid(): new_machine = machine.save(commit=False) new_machine.user = user