Ticket #4384: empty_form.diff
File empty_form.diff, 600 bytes (added by , 17 years ago) |
---|
-
django/newforms/forms.py
12 12 from widgets import TextInput, Textarea 13 13 from util import flatatt, ErrorDict, ErrorList, ValidationError 14 14 15 __all__ = ('BaseForm', 'Form' )15 __all__ = ('BaseForm', 'Form', 'empty_form') 16 16 17 17 NON_FIELD_ERRORS = '__all__' 18 18 … … 319 319 return self.html_name 320 320 return '' 321 321 auto_id = property(_auto_id) 322 323 def empty_form(): 324 return type('EmptyForm', (Form,), {})