MCPcopy
hub / github.com/django/django / initial_form_count

Method initial_form_count

django/forms/models.py:715–719  ·  view source on GitHub ↗

Return the number of forms that are required in this FormSet.

(self)

Source from the content-addressed store, hash-verified

713 )
714
715 def initial_form_count(self):
716 """Return the number of forms that are required in this FormSet."""
717 if not self.is_bound:
718 return len(self.get_queryset())
719 return super().initial_form_count()
720
721 def _existing_object(self, pk):
722 if not hasattr(self, "_object_dict"):

Callers 2

_construct_formMethod · 0.95
initial_form_countMethod · 0.45

Calls 1

get_querysetMethod · 0.95

Tested by

no test coverage detected