Getting Started with DjangoCMS

When I was looking for Django based CMS , Chose Django CMS among many other CMSes.

The main reason for choosing the Django CMS is , it is a developer friendly CMS.

First, go through the following tutorial

Some concepts, which was difficult to understand from the documentation

What is DjangoCMS?

It is a Django application with

  • admin interface customised for adding and organising pages
  • django template with new template tag “placeholder”, where snippets from different plugins can be displayed
  • default plugins
  • easy to write plugin interface

How the template works?

Templates are simple django templates with additional template tag called placeholder. This placeholder behaves exactly like django template blocks in the aspect of inheritance. In addition to that, you will be able to add plugins to the placeholder. The plugins can be any static or dynamically generated content.

How to install DjangoCMS with existing website in a specific path instead of root ?

Just add the following the snippet in your

urlpatterns += patterns('',
    url(r’^mycms/', include('cms.urls')),

Why model should always be giving for plugin , even though you dont have data to store?

The following page is a good start on writing plugin

from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from cms.models.pluginmodel import CMSPlugin
from django.utils.translation import ugettext_lazy as _

class HelloPlugin(CMSPluginBase):
    model = CMSPlugin
    render_template = "hello_plugin.html"


For any plugin, DjangoCMS should maintain relation between a particular page and our plugin. So, for all the plugin, you need to provide a model CMSPlugin or any model which has inherited CMSPluginBase.

This entry was posted in Django, python. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *