1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #27119 -- Cached BaseFormSet.management_form property

Thanks Tim Graham for the review.
This commit is contained in:
Claude Paroz
2016-12-01 20:17:25 +01:00
committed by GitHub
parent dd2e4d7b5d
commit d49551bc26
2 changed files with 31 additions and 4 deletions

View File

@@ -87,7 +87,7 @@ class BaseFormSet(object):
def __nonzero__(self): # Python 2 compatibility
return type(self).__bool__(self)
@property
@cached_property
def management_form(self):
"""Returns the ManagementForm instance for this FormSet."""
if self.is_bound: