InlinePanel进入makemigrations ttributeError:'str'对象没有属性'bind_to_model'

时间:2018-09-18 20:40:38

标签: wagtail

我的代码段是:

class HomePageContentItemSmall(HomePageContentItem):
    page = ParentalKey('home.HomePage', \
           related_name='content_items_small')

class HomePageContentItemLarge(HomePageContentItem):
    page = ParentalKey('home.HomePage', \
           related_name='content_items_large')


class HomePage(Page):
    title_text = RichTextField(null=True, blank=True)

    content_panels =  [
        FieldPanel('title', classname="full title"),
        InlinePanel('content_items_small', label="Karte schmal"),
        #InlinePanel('content_items_large', label="Karte breit"),
    ]

当我使用runserver makemigration时,出现AttributeError:'str'对象没有属性'bind_to_model'

0 个答案:

没有答案