How do I create a subclass of a Page in django-cms that will be displayed in the normal menu? - Stack Overflow

admin2025-04-17  3

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 233 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.

转载请注明原文地址:http://anycun.com/QandA/1744859453a88628.html