def first_field(self):
        try:
            fieldset_name, fieldset_options = self.fieldsets[0]
            field_name = fieldset_options['fields'][0]
            if not isinstance(field_name, six.string_types):
                field_name = field_name[0]
            return self.form[field_name]
        except (__HOLE__, IndexError):
            pass
        try:
            return next(iter(self.form))
        except StopIteration:
            return None
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/contrib/admin/helpers.py/AdminForm.first_field