Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
First steps with django CMS
Search
Iacopo Spalletti
September 21, 2014
Programming
1
930
First steps with django CMS
Basic django CMS introduction given at PyCon UK 2014
Iacopo Spalletti
September 21, 2014
Tweet
Share
More Decks by Iacopo Spalletti
See All by Iacopo Spalletti
Django dalle trincee: pattern e pratiche dopo 15 anni di esperienza su Django
yakky
0
55
Writing Async Microservices in Python
yakky
0
670
1 API - 3 Framework - 30 minutes
yakky
0
93
Building real time applications with Django and Channels 2 @ DjangoCon Europe
yakky
1
690
Building real time applications with Django and Channels 2 @ PyCon Italia
yakky
0
540
Building real time applications with Django
yakky
0
670
django knocker
yakky
0
57
django CMS application - A comprehensive approach
yakky
0
52
django CMS + Channels + DRF = ♥
yakky
0
310
Other Decks in Programming
See All in Programming
Modern Angular with Signals and Signal Store:New Rules for Your Architecture @enterJS Advanced Angular Day 2025
manfredsteyer
PRO
0
200
プロダクト志向ってなんなんだろうね
righttouch
PRO
0
180
Railsアプリケーションと パフォーマンスチューニング ー 秒間5万リクエストの モバイルオーダーシステムを支える事例 ー Rubyセミナー 大阪
falcon8823
5
1.1k
Node-RED を(HTTP で)つなげる MCP サーバーを作ってみた
highu
0
120
Hypervel - A Coroutine Framework for Laravel Artisans
albertcht
1
110
童醫院敏捷轉型的實踐經驗
cclai999
0
210
Blazing Fast UI Development with Compose Hot Reload (droidcon New York 2025)
zsmb
1
280
スタートアップの急成長を支えるプラットフォームエンジニアリングと組織戦略
sutochin26
0
4.2k
ruby.wasmで多人数リアルタイム通信ゲームを作ろう
lnit
3
440
dbt民主化とLLMによる開発ブースト ~ AI Readyな分析サイクルを目指して ~
yoshyum
3
800
PHPでWebSocketサーバーを実装しよう2025
kubotak
0
270
AIと”コードの評価関数”を共有する / Share the "code evaluation function" with AI
euglena1215
1
140
Featured
See All Featured
Side Projects
sachag
455
42k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
950
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
Documentation Writing (for coders)
carmenintech
72
4.9k
The Cost Of JavaScript in 2023
addyosmani
51
8.5k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
20k
Unsuck your backbone
ammeep
671
58k
For a Future-Friendly Web
brad_frost
179
9.8k
Transcript
PYCON UK 2014 FIRST STEPS WITH DJANGO CMS by Iacopo
Spalletti @yakkys
WHO AM I? Founder and Lead developer @NephilaIt django CMS
core developer django CMS installer author
DJANGO CMS FIRST LOOK BRIEF OVERVIEW OF DJANGO CMS FEATURES
FEEL FREE TO COME TO THE BOOTH OR AT THE SPRINTS FOR MORE
WHAT'S DJANGO CMS? 'JUST' A CMS FOR DJANGO (APPARENTLY) With
a twist!
DJANGO CMS HOW IS DIFFERENT? IT'S LIMITED (BY DESIGN) YOU
CANNOT "EXTEND" A PAGE
DJANGO CMS WHY IS THAT? WHY NOT? WE HAVE DJANGO
MODELS! GOOD DJANGO CITIZEN
DJANGO CMS CONTRIBUTING FEATURES django CMS provides features that your
applications can use
BASIC CONCEPTS PAGE PLACEHOLDER PLUGIN APPHOOK FRONTEND EDITOR
LIVES IN A LIVE AND DRAFT VERSION DEFINED BY THE
TEMPLATE APPLIED TO IT PAGE THE BUILDING BLOCK OF THE CMS
PLACEHOLDER ACTIVE AREAS WITHIN YOUR PAGES PLUGIN CONTAINERS DEFINED IN
THE TEMPLATES JUST A TEMPLATETAG
PLACEHOLDER HOW TO DEFINE A PLACEHOLDER? {% placeholder "first_placeholder" %}
PLACEHOLDER THERE IS MORE class MyModel(models.Model): name = models.CharField(max_length=200) abstract
= models.TextField() content = PlaceholderField() Composition, not inheritance
PLUGIN Placeholder = Container Plugin = Content
PLUGIN WHAT'S A PLUGIN? A content A bridge towards other
Django applications
PLUGIN WRITING PLUGIN IS EASY class MyPlugin(CMSPluginBase): name = _('My
plugin') render_template = 'myapp/myplugin.html'
PLUGIN 1. PLUGIN CLASS class MyPlugin(CMSPluginBase): name = _('My plugin')
model = MyPluginModel render_template = 'myapp/myplugin.html' def render(self, context, instance, placeholder): newslist = News.objects.all().order_by('-date') context.update({ 'instance': instance, 'news_list': newslist[:instance.posts] }) return context Plugin = ModelAdmin + template + get_context_data
PLUGIN 2. THE PLUGIN MODEL It's the plugin configuration class
MyPluginModel(CMSPlugin): title = models.CharField(max_length=200) posts = models.PositiveIntegerField()
PLUGIN 3. THE TEMPLATE Template is a standard Django template
fragment to which the plugin generated context is provided <div class="news_list"> <h2>{{ instance.title }}</h2> {% for news in news_list %} <a href="{{ news.get_absolute_url }}"> {{ news.title }}</a><br> {% endfor %} </div>
APPHOOK Is a bridge between the CMS and other Django
applications In rough terms, it appends the application URLConf to the page tree
It wraps the URLCon in a class APPHOOK SOME CODE
class MyApp(CMSApp): name = _("My App") urls = ["apps.my_app.urls"] menus = [MyMenu] apphook_pool.register(MyApp)
APPHOOK THAT'S ALL :)
FRONTEND EDITOR WARNING! IT'S ADDICTIVE!
FRONTEND EDITOR WHAT'S IT? NEW IN DJANGO CMS 3 ADMIN
OUTSIDE THE ADMIN
FRONTEND EDITOR FOLLOW THE WHITE PONY
FRONTEND EDITOR TOOLBAR COMPLETE SIMPLE DYNAMIC CUSTOMIZABLE
FRONTEND EDITOR ANCHE NEI VOSTRI MODEL EVERY MODEL CAN BE
FRONTEND-ENABLED {% render_model instance "abstract" %} {% render_model_block instance %} <h3>{{ instance.title }}</h3> <div class="date">{{ instance.date }}</div> {% endrender_model_block %}
SHAMELESS PLUG!
GRAZIE! SEE YOU TOMORROW! DJANGO CMS SPRINT And tips and
support to use django CMS Iacopo Spalletti
[email protected]
@yakkys