Opened 15 years ago
Closed 15 years ago
#13225 closed (duplicate)
new object with readonly m2m field through an error in the admin
Description ¶
I have a model with m2m field that I want to be readonly.
I want the admin user to be able to see this field but not edit it and I'll populate it in the model save method.
When trying to create a new model instance I'm getting:
instance needs to have a primary key value before a many-to-many relationship can be used.
It should be able to just put an empty string or None in the readonly field.
Thanks
Note:
See TracTickets
for help on using tickets.
This is a dupe of #13004.