I find the problem: The validation was performed also on new extra widget because I have added a field that was always valorized then the self.has_changed property was always true then the validation was performed also for the new extra widget. Now the field is empty by default.
But now another problem, I would override the save_model method for the inline model to read the value of my custom widget. The problem is that if I put the save_model in ModelInline or in ModelAdmin class it is never executed...How can I read the property from my custom widget? mrsource ha scritto: > In the inline model option I have overriden the inline form with a > custom form where I only added a choices widget, now the validation > has a wrong behaviour...more precisely if I have set extra property to > 2 in inline model options, when I click "Save" django try to validate > even the two empty extra inline model that I have left blank and show > an error like "the primary key field must not be empty"... If I remove > my custom form all is ok. > > How can I avoid this validation on the empty extra filed? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---