Re: Problem with a clean in inline formset

2012-05-01 Thread Ernesto Guevara
Solution: def clean(self): if any(self.errors): # Don't bother validating the formset unless each form is valid on its own return for i in range(0, self.total_form_count()): form = self.forms[i] cleaned_data = form.clean() displa

Problem with a clean in inline formset

2012-04-30 Thread Guevara
Hello! The (if display.max_windows() >= display.windows) works fine to prevent insert. Behaves as expected. But is raised even when the row is REMOVED from the edit formset. =/ ## Models class Display(models.Model): windows = models.IntegerField() def max_windows(self): total = self