Ticket #12074: django-formset-as_p-as_ul.diff
File django-formset-as_p-as_ul.diff, 988 bytes (added by , 15 years ago) |
---|
-
django/forms/formsets.py
301 301 forms = u' '.join([form.as_table() for form in self.forms]) 302 302 return mark_safe(u'\n'.join([unicode(self.management_form), forms])) 303 303 304 def as_p(self): 305 "Returns this formset rendered as HTML <p>s." 306 forms = u' '.join([form.as_table() for form in self.forms]) 307 return mark_safe(u'\n'.join([unicode(self.management_form), forms])) 308 309 def as_ul(self): 310 "Returns this formset rendered as HTML <li>s." 311 forms = u' '.join([form.as_ul() for form in self.forms]) 312 return mark_safe(u'\n'.join([unicode(self.management_form), forms])) 313 304 314 def formset_factory(form, formset=BaseFormSet, extra=1, can_order=False, 305 315 can_delete=False, max_num=0): 306 316 """Return a FormSet for the given form class."""