Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Your form is definitely not bound. Read about <a href="http://docs.djangoproject.com/en/dev/ref/forms/api/#bound-and-unbound-forms" rel="noreferrer">Bound and Unbound forms</a>.</p> <p>From that documentation:</p> <blockquote> <p>To bind data to a form, pass the data as a <strong>dictionary</strong> as the <strong>first parameter</strong> to your <strong>Form class constructor</strong>.</p> </blockquote> <p>That means that also the change of a field in your model doesn't make the form bound. You have to pass those values explicitly via the constructor. But:</p> <blockquote> <p>Note that passing an <strong>empty dictionary</strong> creates a <strong>bound form</strong> with empty data</p> </blockquote> <p>and consider this</p> <blockquote> <p>If you have a bound Form instance and want to change the data somehow, or if you want to <strong>bind an unbound Form</strong> instance to some data, <strong>create another Form instance</strong>. There is no way to change data in a Form instance. Once a Form instance has been created, you should consider its data <strong>immutable</strong>, whether it has data or not.</p> </blockquote> <p>If you validate an <strong>unbound</strong> form:</p> <blockquote> <p>It's meaningless to validate a form with no data, but, for the record, here's what happens with unbound forms:</p> <p><code>&gt;&gt;&gt; f = ContactForm()</code><br> <code>&gt;&gt;&gt; f.is_valid()</code><br> <code>False</code><br> <code>&gt;&gt;&gt; f.errors<br> {}</code></p> </blockquote>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload