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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Iacopo Spalletti
September 21, 2014
Programming
1
1.1k
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
74
Writing Async Microservices in Python
yakky
0
870
1 API - 3 Framework - 30 minutes
yakky
0
100
Building real time applications with Django and Channels 2 @ DjangoCon Europe
yakky
1
830
Building real time applications with Django and Channels 2 @ PyCon Italia
yakky
0
660
Building real time applications with Django
yakky
0
820
django knocker
yakky
0
66
django CMS application - A comprehensive approach
yakky
0
54
django CMS + Channels + DRF = ♥
yakky
0
330
Other Decks in Programming
See All in Programming
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
170
Vibe codingでおすすめの言語と開発手法
uyuki234
0
210
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
10
2.3k
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
510
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
1k
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.8k
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
400
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
950
Package Management Learnings from Homebrew
mikemcquaid
0
170
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
Oxlintはいいぞ
yug1224
5
1.2k
Featured
See All Featured
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
53
Abbi's Birthday
coloredviolet
1
4.6k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
130
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
120
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
400
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
59
42k
Writing Fast Ruby
sferik
630
62k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Google's AI Overviews - The New Search
badams
0
900
Claude Code のすすめ
schroneko
67
210k
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