저는 Employee.xml에서 모델로 정의 된 손재주 콘텐츠 형식이 있습니다.plone 5에서 plone 손재수 콘텐츠 형식의 콘텐츠 마이그레이션
<model xmlns="http://namespaces.plone.org/supermodel/schema"
xmlns:marshal="http://namespaces.plone.org/supermodel/marshal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
i18n:domain="plone">
<schema>
<field name="fullname" type="zope.schema.TextLine">
<description />
<required>True</required>
<title>Firstname and Surname</title>
</field>
<field name="position" type="zope.schema.TextLine">
<description />
<required>True</required>
<title>Position</title>
</field>
</schema>
</model>
매우 쉽습니다. 이 클래스는 content.py에 정의되어 있습니다.
class Employee(Item):
"""Convenience subclass for ``Employee`` portal type
"""
내 데이터베이스에는 Employee 인스턴스가 몇 가지 있습니다.
이제 콘텐츠 유형에 새로운 기능을 추가하고 싶습니다.
class Employee(Item):
"""Convenience subclass for ``Employee`` portal type
"""
def Title(self):
return self.fullname
이제 folder_contents보기에서 직원의 성을 볼 수 있습니다. 그러나 수정 후에 추가 된 인스턴스에 대해서만 작동합니다. "오래된"컨텐츠는 마이그레이션이 필요합니다. 내 질문 : 어떻게? 문서가 도움이되지 않았습니다. (https://docs.plone.org/develop/plone/persistency/migrations.html)
Google 포럼 https://community.plone.org에 게시하는 질문은 더 많은 의견을 얻을 것입니다 ... –