From 0746352ed6c631d3cc0edb5ca71ba4d13be74309 Mon Sep 17 00:00:00 2001 From: Jasper Berghoef Date: Tue, 15 Nov 2016 12:21:07 +0100 Subject: [PATCH] Import cleanup and panel order swap --- src/personalisation/models.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/personalisation/models.py b/src/personalisation/models.py index c1b7cbc..6e572cd 100644 --- a/src/personalisation/models.py +++ b/src/personalisation/models.py @@ -13,7 +13,6 @@ from django.utils.functional import cached_property from django.utils.translation import ugettext_lazy as _ from modelcluster.fields import ParentalKey from modelcluster.models import ClusterableModel -from polymorphic.models import PolymorphicModel from wagtail.utils.decorators import cached_classmethod from wagtail.wagtailadmin.edit_handlers import ( FieldPanel, MultiFieldPanel, ObjectList, PageChooserPanel, TabbedInterface) @@ -21,6 +20,7 @@ from wagtail.wagtailadmin.forms import WagtailAdminPageForm from wagtail.wagtailcore.models import Page from personalisation.edit_handlers import ReadOnlyWidget +from polymorphic.models import PolymorphicModel @python_2_unicode_compatible @@ -213,7 +213,6 @@ class AdminPersonalisablePageForm(WagtailAdminPageForm): self.fields['segment'].widget = ReadOnlyWidget( text_display=segment_display if segment_display else '') - class PersonalisablePage(Page): canonical_page = models.ForeignKey( 'self', related_name='variations', blank=True, @@ -291,10 +290,10 @@ def get_edit_handler(cls): tabs = [] if cls.content_panels: tabs.append(ObjectList(cls.content_panels, heading=_("Content"))) - if cls.promote_panels: - tabs.append(ObjectList(cls.promote_panels, heading=_("Promote"))) if cls.variation_panels: tabs.append(ObjectList(cls.variation_panels, heading=_("Variations"))) + if cls.promote_panels: + tabs.append(ObjectList(cls.promote_panels, heading=_("Promote"))) if cls.settings_panels: tabs.append(ObjectList(cls.settings_panels, heading=_("Settings"), classname='settings'))