O'Reilly logo

Web Development with Django Cookbook - Second Edition by Aidas Bendoraitis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding new fields to the CMS page

CMS pages have several multilingual fields such as title, slug, menu title, page title, description meta tag, and overwrite URL. They also have several common nonlanguage-specific fields such as template, ID used in template tags, attached application, and attached menu. However, that might not be enough for more complex websites. Thankfully, Django CMS features a manageable mechanism to add new database fields for CMS pages. In this recipe, you will see how to add fields for the CSS classes for the navigational menu items and page body.

Getting ready

Let's create the cms_extensions app and put it under INSTALLED_APPS in the settings.

How to do it...

To create a CMS page extension with the CSS class fields for the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required