Opened 3 years ago

Closed 3 years ago

#19991 closed New feature (wontfix)

Introduce `saved_forms` property to `BaseModelFormSet`

Reported by: coolRR Owned by: nobody
Component: Forms Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no



Here's something that I use in my code and I'm thinking it might be useful to include in Django by default:

def saved_forms(self):
    if not self.is_bound:
        return ()
    return tuple(form for form in self.forms if ( is not None))

(This is a property of BaseModelFormSet.)

This allows you to access the forms in the formset that were saved.

What do you think? Would this be useful to add to Django?

(I can easily make this code into a patch if you want.)

Change History (1)

comment:1 Changed 3 years ago by jacob

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

This seems somewhat domain-specific; I can't see a good reason to include this in Django. If you think I'm missing something, please start a thread on django-dev and maybe explain a bit more about your motivation?

Note: See TracTickets for help on using tickets.
Back to Top