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
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
2 matches
Mail list logo