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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
76
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
840
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
68
django CMS application - A comprehensive approach
yakky
0
54
django CMS + Channels + DRF = ♥
yakky
0
330
Other Decks in Programming
See All in Programming
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
200
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
21
7.2k
CSC307 Lecture 02
javiergs
PRO
1
780
組織で育むオブザーバビリティ
ryota_hnk
0
170
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
230
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.4k
今から始めるClaude Code超入門
448jp
8
8.7k
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
5
450
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.1k
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
130
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
700
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
560
Featured
See All Featured
Marketing to machines
jonoalderson
1
4.6k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
53
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
Music & Morning Musume
bryan
47
7.1k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.6k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
450
Darren the Foodie - Storyboard
khoart
PRO
2
2.4k
So, you think you're a good person
axbom
PRO
2
1.9k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.2k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.3k
The World Runs on Bad Software
bkeepers
PRO
72
12k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
270
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