I am trying to create my own Add/Update form, using generic views.  I
am dealing with a related  field fase_projeto this way:
{% for fase in form.fase_projeto %}
     <p><label for="id_descricao.{{ forloop.counter0}}.fase">
       Fase {{ forloop.counter0}}:</label> {{ fase.descricao }}</p>
     <p><label for="id_tipo.{{ forloop.counter0}}.fase">
       Descrição:</label> {{ fase.tipo }}</p>

       <p><label for= "id_inicio.{{ forloop.counter0}}.fase">
       Início:</label> {{ fase.inicio }} <span id="id_inicio_aux{{
forloop.counter0}}" style="background-color: #ff8; cursor: default;"
onmouseover="this.style.backgroundColor='#ff0';"
onmouseout="this.style.backgroundColor='#ff8';"> Escolha data </span>

      <p><label for="id_fim.{{ forloop.counter0}}.fase">
       Fim:</label> {{ fase.fim }}</p>
{% endfor %}

But instead of update it inserts a new record. What is going wrong?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to