We will create the actual template files at a later step, don’t worry about it for
now, and simply paste this code in your settings file.

Note

The templates you define in CMS_TEMPLATES have to exist at runtime and
contain at least one {%placeholder<name>%} template tag to be useful
for django CMS. For more details see Creating templates

The django CMS will allow you to edit all languages which Django has built in
translations for, this is way too many so we’ll limit it to English for now:

LANGUAGES=[('en','English'),]

Finally, setup the DATABASES part of the file to reflect your database
deployement. If you just want to try out things locally, sqlite3 is the easiest
database to set up, however it should not be used in production. If you still
wish to use it for now, this is what your DATABASES setting should look
like:

This command depends on whether you upgrade your installation or do a
fresh install. We recommend that you get familiar with the way South works,
as it is a very powerful, easy and convenient tool. Django CMS uses it extensively.

Django CMS uses templates to define how a page should look and what parts of
it are editable. Editable areas are called placeholders. These templates are
standard Django templates and you may use them as described in the
official documentation.

Templates you wish to use on your pages must be declared in the CMS_TEMPLATES
setting:

When you set template_1.html as a template on a page you will get two
placeholders to put plugins in. One is template_1_content from the page
template template_1.html and another is base_content from the extended
base.html.

When working with a lot of placeholders, make sure to give descriptive
names for your placeholders, to more easily identify them in the admin panel.

Now, feel free to experiment and make a template_2.html file! If you don’t feel creative,
just copy template_1 and name the second placeholder something like “template_2_content”.

That’s it, now the best part: you can start using the CMS!
Run your server with pythonmanage.pyrunserver, then point a web browser to
127.0.0.1:8000/admin/ , and log in using the super
user credentials you defined when you ran syncdb earlier.

Once in the admin part of your site, you should see something like the following:

Adding a page is as simple as clicking “Pages” in the admin view, then the “add page” button
on the top right-hand corner of the screen.

This is where you select which template to use (remember, we created two), as well as
pretty obvious things like which language the page is in (used for internationalisation),
the page’s title, and the url slug it will use.

Hitting the “Save” button, well, saves the page. It will now display in the list of
pages.

Congratulations! You now have a fully functional Django CMS installation!

So far, our page doesn’t do much. Make sure it’s marked as “published”, the click on the page’s
“edit” button.

Ignore most of the interface for now, and click the “view on site” button on the
top right-hand corner of the screen. As expected, your page is blank for the time being,
since our template is really a minimal one.

Let’s get to it now then!

Press your browser’s back button, so as to see the page’s admin interface. If you followed
the tutorial so far, your template (template_1.html) defines two placeholders.
The admin interfaces shows you theses placeholders as sub menus:

Scroll down the “Available plugins” drop-down list. This displays the plugins you
added to your INSTALLED_APPS settings. Choose the “text” plugin in the drop-down,
then press the “Add” button.

The right part of the plugin area displays a rich text editor (TinyMCE).

Type in whatever you please there, then press the “Save” button.

Go back to your website using the top right-hand “View on site” button. That’s it!

If your placeholder content isn’t displayed when you view a CMS page: change the
CMS_MODERATOR variable in settings.py to False. This bug has been recently
fixed, so upgrade to the latest version of Django CMS. See:
https://github.com/divio/django-cms/issues/issue/430

If plugins don’t work (e.g.: you add a text plugin, but don’t see the Javascript
text editor in the plugin window), you should use a Javascript inspector in your
browser to investigate the issue (e.g.: Firebug for Firefox, Web Inspector for
Safari or Chrome). The Javascript inspector may report the following errors:

TypeError: Result of expression ‘jQuery’ [undefined] is not a function.

If you see this, check the MEDIA_URL variable in your settings.py file. Your
webserver (e.g.: Apache) should be configured to serve static media files from
this URL.

Unsafe JavaScript attempt to access frame with URL
http://localhost/media/cms/wymeditor/iframe/default/wymiframe.html from frame
with URL http://127.0.0.1:8000/admin/cms/page/1/edit-plugin/2/. Domains,
protocols and ports must match.

This error is due to the Django test server running on a different port and URL
than the main webserver. In your test environment, you can overcome this issue
by adding a CMS_MEDIA_URL variable to your settings.py file, and adding a url
rule in urls.py to make the Django development serve the Django CMS files from
this location.