On Thursday, April 14, 2011 7:09:57 PM UTC+1, ricksteu wrote: > > Shawn - The validation appears to actually takes place *before* the > __init__ is called (during instantiation, not during initialization.) > If you look at BaseForm, scroll past the __init__() method, and you'll > see: > > def _get_errors(self): > "Returns an ErrorDict for the data provided for the form" > if self._errors is None: > self.full_clean() > return self._errors > errors = property(_get_errors) > > That last line calls _get_errors() which in turn calls full_clean(). > (I could totally be missing something) > > Rick
Yes, you are. That last line doesn't call get_errors() at all - you can see there are no calling parentheses after the method name. It's simply the old (pre-2.4) way of defining a decorator. -- DR. -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.