I get this error when running makemigrations for my mezzanine theme
SystemCheckError: System check identified some issues:
ERRORS:
<class 'mezzanine.forms.admin.FormAdmin'>: (admin.E012) There are duplicate
field(s) in 'fieldsets[0][1]'.
<class 'mezzanine.galleries.admin.GalleryAdmin'>: (admin.E012) There are
duplicate field(s) in 'fieldsets[0][1]'.
<class 'mezzanine.pages.admin.PageAdmin'>: (admin.E012) There are duplicate
field(s) in 'fieldsets[0][1]'.
<class 'theme.admin.AboutAdmin'>: (admin.E012) There are duplicate field(s)
in 'fieldsets[0][1]'.
<class 'theme.admin.ContactAdmin'>: (admin.E012) There are duplicate
field(s) in 'fieldsets[0][1]'.
<class 'theme.admin.HomePageAdmin'>: (admin.E012) There are duplicate
field(s) in 'fieldsets[0][1]'.
<class 'theme.admin.ServiceAdmin'>: (admin.E012) There are duplicate
field(s) in 'fieldsets[0][1]'.
<class 'theme.admin.SkillAdmin'>: (admin.E012) There are duplicate field(s)
in 'fieldsets[0][1]'.
Below is an extract of my admin.py file which I think is the source of the
issue.
class HomePageAdmin(PageAdmin):
inlines = (HomeSlideInline,)
class AboutAdmin(PageAdmin):
inlines = (AboutSlideInline,)
class ServiceAdmin(PageAdmin):
inlines = (ServiceBlurbInline,)
class SkillAdmin(PageAdmin):
inlines = (SkillBlurbInline,)
class ContactAdmin(PageAdmin):
inlines = (ContactBlurbInline,)
home_fieldsets = deepcopy(HomePageAdmin.fieldsets)
home_fieldsets[0][1]["fields"].insert(1, "in_opd")
HomePageAdmin.fieldsets = home_fieldsets
about_fieldsets = deepcopy(PageAdmin.fieldsets)
about_fieldsets[0][1]["fields"].insert(1, "in_opd")
AboutAdmin.fieldsets = about_fieldsets
service_fieldsets = deepcopy(PageAdmin.fieldsets)
service_fieldsets[0][1]["fields"].insert(1, "in_opd")
ServiceAdmin.fieldsets = service_fieldsets
skill_fieldsets = deepcopy(PageAdmin.fieldsets)
skill_fieldsets[0][1]["fields"].insert(1, "in_opd")
SkillAdmin.fieldsets = skill_fieldsets
contact_fieldsets = deepcopy(PageAdmin.fieldsets)
contact_fieldsets[0][1]["fields"].insert(1, "in_opd")
ContactAdmin.fieldsets = contact_fieldsets
admin.site.register(HomePage, HomePageAdmin)
admin.site.register(About, AboutAdmin)
admin.site.register(Service, ServiceAdmin)
admin.site.register(Skill, SkillAdmin)
admin.site.register(Portfolio, PageAdmin)
admin.site.register(Blog, PageAdmin)
admin.site.register(Contact, ContactAdmin)
What am I doing wrong?
--
You received this message because you are subscribed to the Google Groups
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.