mirror of
https://github.com/django/django.git
synced 2025-10-25 14:46:09 +00:00
Fixed #20989 -- Removed useless explicit list comprehensions.
This commit is contained in:
@@ -380,17 +380,17 @@ class BaseFormSet(object):
|
||||
# XXX: there is no semantic division between forms here, there
|
||||
# probably should be. It might make sense to render each form as a
|
||||
# table row with each field as a td.
|
||||
forms = ' '.join([form.as_table() for form in self])
|
||||
forms = ' '.join(form.as_table() for form in self)
|
||||
return mark_safe('\n'.join([six.text_type(self.management_form), forms]))
|
||||
|
||||
def as_p(self):
|
||||
"Returns this formset rendered as HTML <p>s."
|
||||
forms = ' '.join([form.as_p() for form in self])
|
||||
forms = ' '.join(form.as_p() for form in self)
|
||||
return mark_safe('\n'.join([six.text_type(self.management_form), forms]))
|
||||
|
||||
def as_ul(self):
|
||||
"Returns this formset rendered as HTML <li>s."
|
||||
forms = ' '.join([form.as_ul() for form in self])
|
||||
forms = ' '.join(form.as_ul() for form in self)
|
||||
return mark_safe('\n'.join([six.text_type(self.management_form), forms]))
|
||||
|
||||
def formset_factory(form, formset=BaseFormSet, extra=1, can_order=False,
|
||||
|
||||
Reference in New Issue
Block a user