Hi Néstor,
Are you using an AutoField()? It seems to me that _should_ work correctly.
In any case setting editable=False should fix it.
Otherwise, would it work to put your primary key field in exclude?
class MyForm(forms.ModelForm):
class Meta:
model = MyModel
exclude = ['id']
Collin
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/d748fdf3-0ed0-4ce6-8cd2-43d973cf7bc2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.