How to remove an inherited field from a new content type

瘦欲@ 提交于 2019-12-25 01:49:35

问题


I'm working with ArgoUML/AGX/Plone 4.1 to generate a subclass using "atevent" as the stereotype. How do I remove the inherited "Event body text" field?


回答1:


you can set the widget invisible for editing and for viewing.

YourSchema['FieldName'].widget.visible = {'view': 'hidden', 'edit':'hidden' }



回答2:


If the field is required in the original schema, you'll also need

YourSchema['FieldName'].required = False


来源:https://stackoverflow.com/questions/7459045/how-to-remove-an-inherited-field-from-a-new-content-type

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!