#12901: Forms _get_validations_exclusions is still not backwards compatible ----------------------------------+----------------------------------------- Reporter: SmileyChris | Owner: nobody Status: closed | Milestone: 1.2 Component: Forms | Version: SVN Resolution: fixed | Keywords: Stage: Accepted | Has_patch: 1 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 1 | ----------------------------------+----------------------------------------- Comment (by ammarr):
Replying to [comment:12 Honza_Kral]: > > No. The key difference here is that if you omit the field in Meta.fields, it doesn't get populated on the model so validation doesn't make sense. If you, however, just override the field definition, the model still get populated with this field and validation should then be run. In addition to the previous message, the only way to exclude a field from model validation is to provide the entire fields tuple, exclude that one field, and then manually declare it. This behavior isn't symmetrical though (declare a field manually, and then just exclude it using the exclude tuple doesn't work). Perhaps this check should be added: {{{ elif self._meta.exclude and field in self._meta.exclude: exclude.append(f.name) }}} -- Ticket URL: <http://code.djangoproject.com/ticket/12901#comment:14> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.