title: How to update an object from edit form in Django?
body: <p>Possibly a newbie question, so please bear with me.</p>
  
  <p>I have a Django form that edits a certain instance of a Model. In order to know which object is being edited, I have a hidden field containing the id of the object, along with the URL containing the id. </p>
  
  <p><strong>First question</strong>: Is having the id of the object in a hidden field the right way of doing it?</p>
  
  <p>My (possibly unfounded) concern with having it only as part of the url is that someone could then open the page of one object id, submit the form to another, and that object will then be overwritten. That's why I'm trying to use a hidden field.</p>
  
  <p>The problem with storing the id in a hidden field is that, on validation of the form, Django complains that the object does not have an unique id (obviously). </p>
  
  <p><strong>Second question</strong>: If a unique field is part of a form, how does one tell Django to ignore the fact that that key already exists, in order to update the object?</p>