admin管理员组

文章数量:1313133

How do I create my own subclass of cms.models.pagemodel.Page, to add some custom fields, template and logic to it?

I can't find where I would register it so that it appears in the normal page tree.

I'm using a PageExtension for now, but I would prefer to have my own class.

How do I create my own subclass of cms.models.pagemodel.Page, to add some custom fields, template and logic to it?

I can't find where I would register it so that it appears in the normal page tree.

I'm using a PageExtension for now, but I would prefer to have my own class.

Share Improve this question asked Jan 31 at 13:40 StefanStefan 133 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

A page extension is the documented and correct way to go.

The Page model (together with the TreeNode model) defines the page tree. Every page is part of the page tree.

In the upcoming version 4.2 of django CMS the page model will change for improved efficiency.

本文标签: How do I create a subclass of a Page in djangocms that will be displayed in the normal menuStack Overflow