Created
July 21, 2018 19:16
-
-
Save KalobTaulien/c201e4cf33ddc609425aff8448e3ad7b to your computer and use it in GitHub Desktop.
Wagtail 2: Removing the Promote and Settings
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
"""Inside the class example.""" | |
from wagtail.core.models import Page | |
class YourPage(Page): | |
"""Your Wagtail Page Type.""" | |
template = "templates/your_page.html" | |
# Your other Page fields | |
settings_panels = [] | |
promote_panels = [] |
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
"""Outside of the class example.""" | |
from wagtail.core.models import Page | |
class YourPage(Page): | |
"""Your Wagtail Page Type.""" | |
template = "templates/your_page.html" | |
# Your other Page fields | |
YourPage.promote_panels = [] # Removes the Promote Panel | |
YourPage.settings_panels = [] # Removes the Settings Panel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment