SlideShare a Scribd company logo
Django CMS
Pim Van Heuven
Think Wize (@twPim_)
Why?
• New Think Wize website
• Request to build a website
• Another request to build a website
• And another one …
• Django experience
Building websites
• Realistic budget
• Increasing baseline demands:
• Responsive
• Components: text and images, carousel, contact
form, map, analytics, newsletter, blog…
• Ability to make small edits
• Build yourself not really effective for most
Contents
• Short introduction to Django CMS
• Making sense of the Django CMS installer
• Plugins
Django CMS
Stack
• Python + relational database + webserver
• Django
• Django admin
• Django CMS
• Content mode (front-end editing)
• Structure mode
• Admin
• Wizards
Website
CMS toolbar
Content mode
double click!
Content mode
Structure mode
Structure mode
Admin
Wizards
Introduction to Django CMS
Django CMS

installer
installer
Django CMS installer
• https://github.com/nephila/djangocms-installer
• pip install djangocms-installer
• virtualenv projectenv
• source env/bin/activate
• mkdir project
• cd project
• djangocms -f -p . website
Versions
django CMS version (choices: 2.4, 3.0, 3.1, stable,develop)
[default stable]: stable
Django version (choices: 1.4, 1.5, 1.6, 1.7, 1.8, stable)
[default stable]: stable
Database configuration

URLs
Database configuration (in URL format) [default
sqlite://localhost/project.db]:
sqlite://localhost/project.db
postgres://user:password@host:port/name
mysql://user:passwordl@host:port/name
i18n / i10n
• i18n = internationalisation
• translations
• i10n = localisation
• date and number formats
Activate Django I18N / L10N setting (choices: yes, no) [default yes]: yes
Reversion
Install and configure reversion support (choices: yes, no)
default yes]: yes
Reversion
• undo / redo changes
• views history
View history…
Languages
Languages to enable. Option can be provided multiple times,
or as a comma separated list. Only language codes supported
by Django can be used
here: nl, en
Optional default time zone [default Europe/Brussels]:
Activate Django timezone support (choices: yes, no) [default
yes]: yes
Introduction to Django CMS
Pages
• Usage: manage.py cms copy-lang <lang_from>
<lang_to>
• urlpatterns = i18n_patterns('', …
CMS permission
management
Activate CMS permission management (choices: yes, no)
[default yes]: no
CMS permissions
page global
permissions
Page permissions
Bootstrap theme
Use Twitter Bootstrap Theme (choices: yes, no) [default no]:
yes
Bootstrap
templates & placeholders
• html pages:
• base.html
• feature.html
• menu.html
• page.html
CMS_TEMPLATES = (
## Customize this
('page.html', 'Page'),
('feature.html', 'Page with Feature')
)
template
Structure mode
Placeholders
• placeholder
• static placeholder
Placeholders
• cms_template
• placeholders
• plugins
page.html
{% extends "base.html" %}
{% load cms_tags %}
{% block title %}{% page_attribute "page_title" %}
{% endblock title %}
{% block content %}
{% placeholder "content" %}
{% endblock content %}
no bootstrap
no bootstrap
• templates:
• base.html
• fullwidth.html
• sidebar_left.html
• sidebar_right.html
CMS_TEMPLATES = (
## Customize this
('fullwidth.html', 'Fullwidth'),
('sidebar_left.html', 'Sidebar Left'),
('sidebar_right.html', 'Sidebar Right')
)
sidebar_left.html
{% extends "base.html" %}
{% load cms_tags %}
{% block title %}{% page_attribute "page_title" %}{
% endblock title %}
{% block content %}
<div class="sidebar">
{% placeholder "sidebar" %}
</div>
<div class="content">
{% placeholder "content" %}
</div>
{% endblock content %}
Custom template
Use custom template set [default no]: no
(Use custom template set [default no]: ~/djangocms/
defaulttemplates/)
Load a starting page with examples after installation
(english language only). Choose "no" if you use a custom
template set. (choices: yes, no) [default no]: yes
Plugins
Plugins
• Must have
• djangocms-admin-style
• djangocms-text-ckeditor
• easy_thumbnails
• django-filer
Introduction to Django CMS
Plugins
• Aldryn
• newsblog
• bootstrap3
• aldryn_people
• aldryn_events
• aldryn_mailchimp
Plugins
• taggit, taggit_autosuggest
• testimony
• cmsplugin_contact
• google_analytics
• image_gallery
Advanced
topics
apps.py
class CmspluginFilerImageConfig(AppConfig):
name = 'cmsplugin_filer_image'
verbose_name = "Image sizes"
class FilerConfig(AppConfig):
name = 'filer'
verbose_name = "Files and images"
aldryn_search
• solr
• haystack
• manage.py build_solr_schema
• manage.py rebuild_index
• django cms apphook
cms_wizards.py
newsblog_article_wizard = NewsBlogArticleWizard(
title=_(u"New news/blog article"),
weight=200,
form=CreateNewsBlogArticleForm,
description=_(u"Create a new news/blog article.")
)
wizard_pool.register(newsblog_article_wizard)
templatetag
from django import template
register = template.Library()
@register.filter
def specialplugin(field):
if field in ['TextPlugin', 'FilerImagePlugin',
'LinkPlugin']:
return True
else:
return False
templatetag
templates/cms/toolbar/dragitem_menu.html
{% for module in module_list %}
{% for p in module.list %}
{% if p.value|specialplugin %}
<div class="cms-submenu-item">
<a style="background:#dff0d8" data-rel="add"
href="{{ p.value }}">{{ p.name }}</a>
</div>
{% endif %}
{% endfor %}
{% endfor %}
Introduction to Django CMS
Conclusion
• Django CMS: The open-source CMS used by
thousands of websites since 2007
• Effective way to build websites whether you
need the "content management" part or not
• Values technical quality and usability
• Recommended

More Related Content

PPTX
Google Vertex AI
PPTX
Azure DevOps
PPTX
Terraform Basics
PPTX
Introduction to kubernetes
ODP
Kubernetes Architecture
PPTX
Introduction to Kubernetes
PDF
Monitoring with prometheus
Google Vertex AI
Azure DevOps
Terraform Basics
Introduction to kubernetes
Kubernetes Architecture
Introduction to Kubernetes
Monitoring with prometheus

What's hot (20)

PDF
Apache Cassandra multi-datacenter essentials
PPTX
Introduction to docker
PPTX
Prometheus and Grafana
PDF
Spring Framework - MVC
PDF
Kubernetes - A Comprehensive Overview
PDF
Kubernetes architecture
PPTX
PPTX
Soap, wsdl et uddi
PDF
Practical CephFS with nfs today using OpenStack Manila - Ceph Day Berlin - 12...
PDF
Jacob Marble [InfluxData] | Observability with InfluxDB IOx and OpenTelemetry...
PDF
Kubernetes Deployment Strategies
PDF
Terraform introduction
PDF
Nginx Essential
PDF
Monitoring modern applications using Elastic
PPTX
MongoDB
PDF
Kubernetes Introduction
PPTX
Load Balancing and Scaling with NGINX
PDF
Terraform - IAC - de quoi s'agit t'il ?.pdf
PDF
PPTX
Basic Concept of Node.js & NPM
Apache Cassandra multi-datacenter essentials
Introduction to docker
Prometheus and Grafana
Spring Framework - MVC
Kubernetes - A Comprehensive Overview
Kubernetes architecture
Soap, wsdl et uddi
Practical CephFS with nfs today using OpenStack Manila - Ceph Day Berlin - 12...
Jacob Marble [InfluxData] | Observability with InfluxDB IOx and OpenTelemetry...
Kubernetes Deployment Strategies
Terraform introduction
Nginx Essential
Monitoring modern applications using Elastic
MongoDB
Kubernetes Introduction
Load Balancing and Scaling with NGINX
Terraform - IAC - de quoi s'agit t'il ?.pdf
Basic Concept of Node.js & NPM
Ad

Similar to Introduction to Django CMS (20)

PDF
Mezzanine簡介 (at) Taichung.py
PDF
Django Overview
PPTX
Untangling spring week5
PPTX
Twitter Bootstrap Presentation
PDF
Code &amp; design your first website (3:16)
ZIP
URUG Ruby on Rails Workshop - Sesssion 5
PDF
GDG Addis - An Introduction to Django and App Engine
PDF
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
KEY
Introduction Django
PDF
WordPress Theme and Plugin Optimization - WordPress Arvika March '14
KEY
Sears Front End Changes
PDF
WordPress Theming Best Practices
PPTX
Blog HTML example for IML 295
PDF
Drupal Step-by-Step: How We Built Our Training Site, Part 2
PDF
Seven deadly theming sins
PDF
Content Management Systems (CMS) & Wordpress theme development
PDF
HTML5, just another presentation :)
PPTX
WordPress theme setting page
PPT
Cssbestpracticesjstyleguidejandtips 150830184202-lva1-app6892
PPT
Css best practices style guide and tips
Mezzanine簡介 (at) Taichung.py
Django Overview
Untangling spring week5
Twitter Bootstrap Presentation
Code &amp; design your first website (3:16)
URUG Ruby on Rails Workshop - Sesssion 5
GDG Addis - An Introduction to Django and App Engine
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
Introduction Django
WordPress Theme and Plugin Optimization - WordPress Arvika March '14
Sears Front End Changes
WordPress Theming Best Practices
Blog HTML example for IML 295
Drupal Step-by-Step: How We Built Our Training Site, Part 2
Seven deadly theming sins
Content Management Systems (CMS) & Wordpress theme development
HTML5, just another presentation :)
WordPress theme setting page
Cssbestpracticesjstyleguidejandtips 150830184202-lva1-app6892
Css best practices style guide and tips
Ad

Recently uploaded (20)

PDF
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
PPTX
artificial intelligence overview of it and more
PPTX
Internet___Basics___Styled_ presentation
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
PDF
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
PPTX
international classification of diseases ICD-10 review PPT.pptx
PDF
Decoding a Decade: 10 Years of Applied CTI Discipline
PPTX
Power Point - Lesson 3_2.pptx grad school presentation
PPTX
Funds Management Learning Material for Beg
PDF
Slides PDF The World Game (s) Eco Economic Epochs.pdf
PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
PDF
An introduction to the IFRS (ISSB) Stndards.pdf
PDF
How to Ensure Data Integrity During Shopify Migration_ Best Practices for Sec...
PPT
tcp ip networks nd ip layering assotred slides
DOCX
Unit-3 cyber security network security of internet system
PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PDF
Cloud-Scale Log Monitoring _ Datadog.pdf
PPTX
522797556-Unit-2-Temperature-measurement-1-1.pptx
PPTX
presentation_pfe-universite-molay-seltan.pptx
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
artificial intelligence overview of it and more
Internet___Basics___Styled_ presentation
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
The New Creative Director: How AI Tools for Social Media Content Creation Are...
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
international classification of diseases ICD-10 review PPT.pptx
Decoding a Decade: 10 Years of Applied CTI Discipline
Power Point - Lesson 3_2.pptx grad school presentation
Funds Management Learning Material for Beg
Slides PDF The World Game (s) Eco Economic Epochs.pdf
Tenda Login Guide: Access Your Router in 5 Easy Steps
An introduction to the IFRS (ISSB) Stndards.pdf
How to Ensure Data Integrity During Shopify Migration_ Best Practices for Sec...
tcp ip networks nd ip layering assotred slides
Unit-3 cyber security network security of internet system
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
Cloud-Scale Log Monitoring _ Datadog.pdf
522797556-Unit-2-Temperature-measurement-1-1.pptx
presentation_pfe-universite-molay-seltan.pptx

Introduction to Django CMS