title: Need a non-editable field in POST data, but ModelForm won't let me
body: <p>I have a <code>Model</code> with a UUID as the pk.</p>
  
  <pre><code>class Product(models.Model):
      uuid = models.UUIDField(
          primary_key=True, 
          default=uuid.uuid4, 
          editable=False)
  </code></pre>
  
  <p>I need to edit some other fields using a <code>ModelForm</code> and need to submit the UUID in the POST data to identify the <code>Product</code>. At the moment, I get:</p>
  
  <pre><code>django.core.exceptions.FieldError: 'uuid' cannot be specified for Product model form as it is a non-editable field
  </code></pre>
  
  <p>Obviously I could make the field non-editable to quickly solve this an be done with it. However it seems to me that refusing write access to this field should occur at a lower level of logic than a <code>ModelForm</code> (i.e. I think an exception should be raised upon trying to edit it instead). Is it possible to do this instead?</p>
  
  <p>Edit: sanitized traceback</p>
  
  <pre><code>  File "/webapps/myapp/urls.py", line 6, in &lt;module&gt;
      from my_app import views
    File "/webapps/myapp/views/__init__.py", line 2, in &lt;module&gt;
      from .my_view import MyView
    File "/webapps/myapp/views/my_view.py", line 12, in &lt;module&gt;
      from my_app.forms import ProductForm
    File "/webapps/myapp/forms.py", line 5, in &lt;module&gt;
      class ProductForm(forms.ModelForm):
    File "/webapps/myapp/lib/python3.5/site-packages/django/forms/models.py", line 242, in __new__
      opts.field_classes)
    File "/webapps/myapp/lib/python3.5/site-packages/django/forms/models.py", line 138, in fields_for_model
      f.name, model.__name__)
  django.core.exceptions.FieldError: 'uuid' cannot be specified for Product model form as it is a non-editable field
  </code></pre>
  
  <p>And form code:</p>
  
  <pre><code>class ProductForm(forms.ModelForm):
      uuid = forms.UUIDField(required=False, widget=forms.HiddenInput())
  </code></pre>