Request.GET can't apply when processing a POST request. You are quoting 'cur.id_reg' when accessing the GET (should be POST) params and it probably should not be - you need to access the "name" attribute that your form uses. You should also be using cleaned_data <https://docs.djangoproject.com/en/3.2/ref/forms/api/> after using proper form validation, and in this case you should probably be using a formset <https://docs.djangoproject.com/en/3.2/topics/forms/formsets/> instead of manually generating a multiple record input form.
HTH, David On Wed, Sep 29, 2021 at 7:15 AM Gabriel Araya Garcia < [email protected]> wrote: > I have one grid > > <form name="form" method="POST"> > </div> > {% for pr in parasalida %} > <tr style="font-size:14px"> > <td>{{ pr.estado}}</td> > <td>{{ pr.fecha_ing|date:'d-m-Y'}}</td> > <td>{{ pr.lote}}</td> > <td>{{ pr.oc_ascoex}}</td> > <td>{{ pr.cantidad}}</td> > <td>{{ pr.extraida}}</td> > <td><input type="number" name='{{pr.id_reg}}' > class='saca' value="{{saca_x}}" placeholder='0'/></td> > > </tr> > {% endfor %} > > but, I don't know how to get the value in view: > > parasalida = Parasalida.objects.all() > a_prueba = [] > for cur in parasalida: > saca_x = request.GET.get('cur.id_reg') # template's value > according to name property > a_prueba.append(saca_x) > > The list is full with [None,None,None,..] > > All others fields are already with values. The only values that user input > is "input text" > > Thank for your help > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/a2ba10d5-639e-4a08-88fe-a4206e18c249n%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/a2ba10d5-639e-4a08-88fe-a4206e18c249n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAE5VhgWG3AjQD_vASX%3DG%2BpgmNdg9FVc6VSEn-dCf%3DjiNuPncwQ%40mail.gmail.com.

