Language Code

To dynamically set the language of your template, change the html-tag:

<!DOCTYPE html>
<html lang="en">


<!DOCTYPE html>
<html lang="{{ LANGUAGE_CODE }}">

Meta Description

To easily add specific meta descriptions for each django CMS page, simply add the appropriate tag to the template.

<meta name="description" content="">
<meta name="author" content="">

Simply add the {% page_attribute 'meta_description' %} tag:

<meta name="description" content="{% page_attribute 'meta_description' %}">
<meta name="author" content="">

Page Title

Next, we want to setup a dynamic page title. Navigate to the <title></title> tag and check its content. It currently reads: “Clean Blog - About.” 

<title>Clean Blog - Start Bootstrap Theme</title>

Replace this with:

  {% block title %}
    {% page_attribute "page_title" %} - {{ }}
  {% endblock title %}

The block title might be used by third party addons, as well as provide additional information on your page. 

In this case, we want to display the page_title attribute which might read “Home” or “Blog”. The second param will display “Site” or whatever you configured in the Sites section earlier on.


The logo is currently defined as follows:

<a class="navbar-brand" href="index.html">Start Bootstrap</a>

To make it more dynamic, let’s change the href-attribute to “/" and "Start Bootstrap" to: 

<a class="navbar-brand" href="/">{{ }}</a>


Let’s conclude the first step of the implementation here by adding dynamic information to the footer. 

It currently reads: 

<p class="copyright text-muted">Copyright &copy; Your Website 2018</p>

We can make “Your Website” dynamic by using:

{{ }}

Django offers a wide range of template tags you can use, which you can find here

One of these is {% now "Y" %}, which will render the current year. The end result might look something like this:

<p class="copyright text-muted">Copyright &copy; {{ }} {% now "Y" %}</p>


Divio Cloud installs all static files and templates from addons directly into your project. Any subsequent addon update will not override these templates. We recommend that you remove at least the following folders:

  • static/djangocms_bootstrap4
  • static/djangocms_googlemap
  • static/djangocms_text_ckeditor
  • static/doc & /doc
  • templates/cms
  • templates/djangocms_bootstrap4
  • templates/djangocms_file
  • templates/djangocms_googlemap
  • templates/djangocms_history
  • templates/djangocms_link
  • templates/djangocms_picture
  • templates/djangocms_snippet
  • templates/djangocms_style
  • templates/djangocms_video

This will not break your project, the templates will just fallback to the addons default templates following the Django template inheritance.

django CMS has very few strict conventions on how to use or name things in your template. This is merely a best practice example to help you get started. Feel free to adapt it to your own personal flavour.

Did this answer your question?