Buenas,

Un update, en caso que los datos ya existen quizas? Sino no lo entiendo?







El dj., 25 d’abr. 2019, 16:09, <tatianamesa...@gmail.com> va escriure:

> Buen día,
>
> Vengo trabajando con un formulario en html que captura los datos mediante
> AJAX y los guarda en una base de datos postgres.
>
> Ahora quiero realizar un update, en ese mismo formulario,
>
> De que manera puedo mostrar los datos que guarde en la base de datos, en
> los inputs del formulario, para decidir si quiero dejar esos datos o quiero
> actualizarlos.
>
>
> Agradezco mucho sus soluciones.
>
>
> Este es mi formulario en el que guardo inicialmente
>
>
> <form class="post">{%csrf_token%}
> <div class="articleunique">
> <input type="" class="id_articulo" name="id_articulo"  value="{{
> article.id }}">
> </div>
> <p>Tags</p>
> <input  type='text' id="flex"
> placeholder='Write your tags'
> class='flexdatalist data_tags'
> params='["name"]',
> data-search-in='name'
> data-visible-properties='["name"]'
> data-selection-required='true'
> data-value-property='id'
> data-min-length='2'
> multiple='multiple'
> name='country_id_multiple' required>
> <div class="post-form"><br>
> <p>Tono</p>
> <select  class="form-control Tono"  style="">
> <option selected></option>
> {% for t in tones %}
> <option  value="{{ t }}">
> {{ t.nombre }}
> </option>
> {% endfor %}
> </select>
> </div><br><br>
> <div class="post-form">
> <p>Tema</p>
> <div class="nuevo">
> <!-- Tercer input temas que se crea con la function de Javascript -->
> <div class="miDiv"></div>
> <button class="btn btn-warning añadir_tema">Añadir Tema</button>
> </div>
> <br>
> <br>
> <div class="btn_seccion1">
> <input type="button"  value="Guardar"class=" btn_save btn btn-danger
> guardar" style="width: 150px">
> </div>
> <br><br>
> </div>
> </form>
>
> --
> 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 django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/202a9a2b-e6da-49ff-83ec-d884e994b5a9%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/202a9a2b-e6da-49ff-83ec-d884e994b5a9%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK-JoTSaJyJogke1fJ-uWbOia5uWt2Eai23HuUensoKPY8AdjA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to