{"id":265,"date":"2014-04-18T09:07:22","date_gmt":"2014-04-18T09:07:22","guid":{"rendered":"http:\/\/www.ramandv.com\/blog\/?p=265"},"modified":"2014-04-20T10:23:53","modified_gmt":"2014-04-20T10:23:53","slug":"getting-started-djangocms","status":"publish","type":"post","link":"http:\/\/www.ramandv.com\/blog\/getting-started-djangocms\/","title":{"rendered":"Getting Started with DjangoCMS"},"content":{"rendered":"\n<!-- Quick Adsense WordPress Plugin: http:\/\/quickadsense.com\/ -->\n<div class=\"e9e85ee105af8a6a4a383deebf1fa216\" data-index=\"1\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-4917982260456644\";\r\n\/* ramandv.com-ad1 *\/\r\ngoogle_ad_slot = \"9226290554\";\r\ngoogle_ad_width = 728;\r\ngoogle_ad_height = 90;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n<p>When I was looking for Django based CMS , Chose Django CMS among many other CMSes.<\/p>\n<p><a href=\"https:\/\/www.djangopackages.com\/grids\/g\/cms\/\">https:\/\/www.djangopackages.com\/grids\/g\/cms\/<\/a><\/p>\n<p>The main reason for choosing the Django CMS is , it is a developer friendly CMS.<\/p>\n<p>First, go through the following tutorial<\/p>\n<p><a href=\"http:\/\/docs.django-cms.org\/en\/2.4.3\/getting_started\/tutorial.html\">http:\/\/docs.django-cms.org\/en\/2.4.3\/getting_started\/tutorial.html<\/a><\/p>\n<p>Some concepts, which was difficult to understand from the documentation<\/p>\n<p><strong>What is DjangoCMS?<\/strong><\/p>\n<p>It is a Django application with<\/p>\n<ul>\n<li>admin interface customised for adding and organising pages<\/li>\n<li>django template with new template tag &#8220;placeholder&#8221;, where snippets from different plugins can be displayed<\/li>\n<li>default plugins<\/li>\n<li>easy to write plugin interface<\/li>\n<\/ul>\n<p><strong>How the template works?<\/strong><\/p>\n<p>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.<\/p>\n<p><strong>How to install DjangoCMS with existing website in a specific path instead of root ?<\/strong><\/p>\n<p>Just add the following the snippet in your urls.py<\/p>\n<pre><code>urlpatterns += patterns('',\n    url(r\u2019^mycms\/', include('cms.urls')),\n)\n<\/code><\/pre>\n<p><strong>Why model should always be giving for plugin , even though you dont have data to store?<\/strong><\/p>\n<p>The following page is a good start on writing plugin<\/p>\n<p><a href=\"http:\/\/docs.django-cms.org\/en\/2.4.3\/extending_cms\/custom_plugins.html\">http:\/\/docs.django-cms.org\/en\/2.4.3\/extending_cms\/custom_plugins.html<\/a><\/p>\n<pre><code>from cms.plugin_base import CMSPluginBase\nfrom cms.plugin_pool import plugin_pool\nfrom cms.models.pluginmodel import CMSPlugin\nfrom django.utils.translation import ugettext_lazy as _\n\nclass HelloPlugin(CMSPluginBase):\n    model = CMSPlugin\n    render_template = \"hello_plugin.html\"\n\nplugin_pool.register_plugin(HelloPlugin)\n<\/code><\/pre>\n<p>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.<\/p>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>When I was looking for Django based CMS , Chose Django CMS among many other CMSes. https:\/\/www.djangopackages.com\/grids\/g\/cms\/ The main reason for choosing the Django CMS is , it is a developer friendly CMS. First, go through the following tutorial http:\/\/docs.django-cms.org\/en\/2.4.3\/getting_started\/tutorial.html &hellip; <a href=\"http:\/\/www.ramandv.com\/blog\/getting-started-djangocms\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[8,18],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<meta name=\"description\" content=\"DjangoCMS tutorial - basic concepts explained\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.ramandv.com\/blog\/getting-started-djangocms\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Getting Started with DjangoCMS - Articles for Developers\" \/>\n<meta property=\"og:description\" content=\"DjangoCMS tutorial - basic concepts explained\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.ramandv.com\/blog\/getting-started-djangocms\/\" \/>\n<meta property=\"og:site_name\" content=\"Articles for Developers\" \/>\n<meta property=\"article:published_time\" content=\"2014-04-18T09:07:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-04-20T10:23:53+00:00\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ramandv\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.ramandv.com\/blog\/#website\",\"url\":\"http:\/\/www.ramandv.com\/blog\/\",\"name\":\"Articles for Developers\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.ramandv.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.ramandv.com\/blog\/getting-started-djangocms\/#webpage\",\"url\":\"http:\/\/www.ramandv.com\/blog\/getting-started-djangocms\/\",\"name\":\"Getting Started with DjangoCMS - Articles for Developers\",\"isPartOf\":{\"@id\":\"http:\/\/www.ramandv.com\/blog\/#website\"},\"datePublished\":\"2014-04-18T09:07:22+00:00\",\"dateModified\":\"2014-04-20T10:23:53+00:00\",\"author\":{\"@id\":\"http:\/\/www.ramandv.com\/blog\/#\/schema\/person\/ca1ede7143462f244081566e6ff97658\"},\"description\":\"DjangoCMS tutorial - basic concepts explained\",\"breadcrumb\":{\"@id\":\"http:\/\/www.ramandv.com\/blog\/getting-started-djangocms\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.ramandv.com\/blog\/getting-started-djangocms\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.ramandv.com\/blog\/getting-started-djangocms\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Getting Started with DjangoCMS\"}]},{\"@type\":\"Person\",\"@id\":\"http:\/\/www.ramandv.com\/blog\/#\/schema\/person\/ca1ede7143462f244081566e6ff97658\",\"name\":\"ramandv\",\"url\":\"http:\/\/www.ramandv.com\/blog\/author\/ramandv\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"description":"DjangoCMS tutorial - basic concepts explained","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.ramandv.com\/blog\/getting-started-djangocms\/","og_locale":"en_US","og_type":"article","og_title":"Getting Started with DjangoCMS - Articles for Developers","og_description":"DjangoCMS tutorial - basic concepts explained","og_url":"http:\/\/www.ramandv.com\/blog\/getting-started-djangocms\/","og_site_name":"Articles for Developers","article_published_time":"2014-04-18T09:07:22+00:00","article_modified_time":"2014-04-20T10:23:53+00:00","twitter_misc":{"Written by":"ramandv","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"http:\/\/www.ramandv.com\/blog\/#website","url":"http:\/\/www.ramandv.com\/blog\/","name":"Articles for Developers","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.ramandv.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"WebPage","@id":"http:\/\/www.ramandv.com\/blog\/getting-started-djangocms\/#webpage","url":"http:\/\/www.ramandv.com\/blog\/getting-started-djangocms\/","name":"Getting Started with DjangoCMS - Articles for Developers","isPartOf":{"@id":"http:\/\/www.ramandv.com\/blog\/#website"},"datePublished":"2014-04-18T09:07:22+00:00","dateModified":"2014-04-20T10:23:53+00:00","author":{"@id":"http:\/\/www.ramandv.com\/blog\/#\/schema\/person\/ca1ede7143462f244081566e6ff97658"},"description":"DjangoCMS tutorial - basic concepts explained","breadcrumb":{"@id":"http:\/\/www.ramandv.com\/blog\/getting-started-djangocms\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.ramandv.com\/blog\/getting-started-djangocms\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/www.ramandv.com\/blog\/getting-started-djangocms\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Getting Started with DjangoCMS"}]},{"@type":"Person","@id":"http:\/\/www.ramandv.com\/blog\/#\/schema\/person\/ca1ede7143462f244081566e6ff97658","name":"ramandv","url":"http:\/\/www.ramandv.com\/blog\/author\/ramandv\/"}]}},"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6YZCe-4h","_links":{"self":[{"href":"http:\/\/www.ramandv.com\/blog\/wp-json\/wp\/v2\/posts\/265"}],"collection":[{"href":"http:\/\/www.ramandv.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ramandv.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ramandv.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ramandv.com\/blog\/wp-json\/wp\/v2\/comments?post=265"}],"version-history":[{"count":1,"href":"http:\/\/www.ramandv.com\/blog\/wp-json\/wp\/v2\/posts\/265\/revisions"}],"predecessor-version":[{"id":266,"href":"http:\/\/www.ramandv.com\/blog\/wp-json\/wp\/v2\/posts\/265\/revisions\/266"}],"wp:attachment":[{"href":"http:\/\/www.ramandv.com\/blog\/wp-json\/wp\/v2\/media?parent=265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ramandv.com\/blog\/wp-json\/wp\/v2\/categories?post=265"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ramandv.com\/blog\/wp-json\/wp\/v2\/tags?post=265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}