diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py
a
|
b
|
|
177 | 177 | return self.fieldsets |
178 | 178 | elif self.fields: |
179 | 179 | return [(None, {'fields': self.fields})] |
| 180 | elif getattr(getattr(self.form, '_meta', None), 'fieldsets', None): |
| 181 | fieldsets = [] |
| 182 | for name, options in self.form._meta.fieldsets: |
| 183 | legend = options.get('legend') |
| 184 | fields = [field for field in options['fields'] if field in self.form.base_fields] |
| 185 | if fields: |
| 186 | fieldsets.append((legend, {'fields': fields})) |
| 187 | return fieldsets |
180 | 188 | return None |
181 | 189 | declared_fieldsets = property(_declared_fieldsets) |
182 | 190 | |