Ticket #8194: 8194_against_8630.diff

File 8194_against_8630.diff, 982 bytes (added by Fred Bartle, 16 years ago)
  • django/contrib/admin/helpers.py

     
    2020            yield Fieldset(self.form, name, **options)
    2121
    2222    def first_field(self):
     23        if self.form._meta.fields is not None:
     24            name = self.form._meta.fields[0]
     25            return forms.BoundField(self.form, self.form.fields[name], name)
    2326        for bf in self.form:
    2427            return bf
    2528
  • django/forms/forms.py

     
    1313from widgets import Media, media_property, TextInput, Textarea
    1414from util import flatatt, ErrorDict, ErrorList, ValidationError
    1515
    16 __all__ = ('BaseForm', 'Form')
     16__all__ = ('BaseForm', 'Form', 'BoundField')
    1717
    1818NON_FIELD_ERRORS = '__all__'
    1919
Back to Top