Преглед изворни кода

G[B
Modifiche di cui verrà eseguito il commit:
modificato: azienda/templates/azienda.welcome.html
modificato: azienda/views.py

mauro пре 1 година
родитељ
комит
20dfb22a06
2 измењених фајлова са 3 додато и 3 уклоњено
  1. 1 1
      azienda/templates/azienda.welcome.html
  2. 2 2
      azienda/views.py

+ 1 - 1
azienda/templates/azienda.welcome.html

@@ -13,7 +13,7 @@
       {% csrf_token %}
       {% for az in azienda %}
         <tr>
-	  <td> {{ az.nome }} </td>
+	  <td> {{ az.id }}{{ az.nome }} </td>
 	  <td> {{ az.partitaita }}</td>
           <td><button type="submit" class='btn btn-primary' name="utenti" value="{{ az.id }}">Utenti</button>
               <button type='submit' class="btn btn-primary" name="documenti" value='{{ az.id }}'>Documenti</button>

+ 2 - 2
azienda/views.py

@@ -34,7 +34,7 @@ def welcome(request):
       print('premuto tasto utenti')
       # stato premuto il tasto, tocca recuperare l'id
       azienda = request.POST['utenti']
-      print('azienda',azienda)
+      print('azienda x utenti',azienda)
       request.session['AziendaId'] = azienda
       return HttpResponseRedirect(reverse('utente:welcome'))
 
@@ -42,7 +42,7 @@ def welcome(request):
       # stato premuto il tasto documenti
       azienda = request.POST['documenti']
       print('premuto tasto documenti',azienda)
-      print('azienda',azienda)
+      print('azienda x documenti',azienda)
       request.session['AziendaId'] = azienda
       return HttpResponseRedirect(reverse('documento:welcome'))