Last active
December 19, 2015 02:48
-
-
Save kenbolton/5885243 to your computer and use it in GitHub Desktop.
Remove 'in_menus' from Mezzanine's `Page` instance admin. Insert '_order' at the beginning of the list of fields.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from copy import deepcopy | |
from django.contrib import admin | |
from mezzanine.pages.admin import PageAdmin | |
from mezzanine.pages.models import Page | |
fieldsets = deepcopy(PageAdmin.fieldsets) | |
fieldsets[0][1]["fields"].remove('in_menus') | |
fieldsets[0][1]["fields"].insert(0, '_order') | |
class CustomPageAdmin(PageAdmin) | |
fieldsets = fieldsets | |
admin.site.unregister(Page) | |
admin.site.register(Page, CustomPageAdmin) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment