def fields(self):
        fk = getattr(self.formset, "fk", None)
        for i, field in enumerate(flatten_fieldsets(self.fieldsets)):
            if fk and fk.name == field:
                continue
            if field in self.readonly_fields:
                yield {
                    'label': label_for_field(field, self.opts.model, self.opts),
                    'widget': {
                        'is_hidden': False
                    },
                    'required': False
                }
            else:
                yield self.formset.form.base_fields[field]
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/contrib/admin/helpers.py/InlineAdminFormSet.fields/original