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
Developing with Django
Search
Daniel Ryan
October 22, 2011
Technology
2
310
Developing with Django
A "get started" guide to Django powered websites.
Daniel Ryan
October 22, 2011
Tweet
Share
More Decks by Daniel Ryan
See All by Daniel Ryan
Human-first Web Design
dryan
11
2.5k
Yes We Did: Reelecting Obama.
dryan
1
420
5 Ways to Embrace HTML5 Today
dryan
5
230
CSS3: Possibilities, Best Practices and Pitfalls
dryan
1
130
CSS for Mobile
dryan
2
170
Other Decks in Technology
See All in Technology
FastConnect の冗長性
ocise
1
9.6k
ハッキングの世界に迫る~攻撃者の思考で考えるセキュリティ~
nomizone
12
4.5k
サーバーレスアーキテクチャと生成AIの融合 / Serverless Meets Generative AI
_kensh
12
3k
SA Night #2 FinatextのSA思想/SA Night #2 Finatext session
satoshiimai
1
100
スクラムのイテレーションを導入してチームの雰囲気がより良くなった話
eccyun
0
110
明日からできる!技術的負債の返済を加速するための実践ガイド~『ホットペッパービューティー』の事例をもとに~
recruitengineers
PRO
3
100
【Developers Summit 2025】プロダクトエンジニアから学ぶ、 ユーザーにより高い価値を届ける技術
niwatakeru
2
890
滅・サービスクラス🔥 / Destruction Service Class
sinsoku
6
1.5k
転生CISOサバイバル・ガイド / CISO Career Transition Survival Guide
kanny
2
390
リアルタイム分析データベースで実現する SQLベースのオブザーバビリティ
mikimatsumoto
0
950
Culture Deck
optfit
0
330
AWSでRAGを実現する上で感じた3つの大事なこと
ymae
3
1k
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
10
1.3k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
366
25k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.3k
Building Your Own Lightsaber
phodgson
104
6.2k
How STYLIGHT went responsive
nonsquared
98
5.3k
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
The Pragmatic Product Professional
lauravandoore
32
6.4k
Producing Creativity
orderedlist
PRO
343
39k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
12
950
Transcript
Developing with Django Daniel Ryan http://dryan.com
Some Background Lawrence Journal-World Ellington Pycon 2005 • • •
Sites Powered by Django
Acronyms Abound MTV - Model • Template • View DRY
- Don’t Repeat Yourself ORM - Object-relational Mapping • • •
MTV vs. MVC Model = Model Template = View View
= Controller • • •
Installing Django Check out http://dryan.com/articles/snow-leopard-64bit- mamp/#python Python Trunk versus Stable
Release Third Party Libraries • • • •
A Django Workflow Create a project Configure settings.py Configure urls.py
Create the database tables • • • •
A Django Workflow Create an app Define your models Create
the database tables Define your urls Define your views • • • • •
Reduce, Reuse, Recycle direct_to_template redirect_to archive_index archive_year archive_month archive_week archive_day
archive_today object_detail (date based) object_list object_detail (list based) create_object update_object delete_object Django Generic Views
Django Templates Just like PHP, except the exact opposite True
separation of logic and presentation Global templates vs. app templates Blocks Tags • • • • •
Built-in Tags autoescape block comment cycle debug extends filter firstof
for for ... empty if ifchanged ifequal ifnotequal include load now regroup spaceless ssi templatetag url widthratio with
Built-in Filters add addslashes capfirst center cut date default default_if_none
dictsort dictsortreversed escapejs filesizeformat first fix_ampersands floatformat force_escape get_digit iriencode join last length_is linebreaks linebreaksbr linenumbers ljust lower make_list phone2numeric pluralize pprint removetags rjust safe safeseq slice slugify stringformat striptags time timesince title truncatewords truncatewords_html unordered_list upper urlencode urlize urlizetrunc wordcount wordwrap
Other Freebies Admin site Authentication Cache system Conditional content processing
Comments Content types Cross Site Request Forgery protection Databrowse E-mail (sending) Flatpages Humanize Internationalization Jython support “Local flavor” Pagination Redirects Serialization Sessions Signals Sitemaps Sites Syndication feeds (RSS/Atom) Unicode in Django Web design helpers django.contrib
Resources http://docs.djangoproject.com irc://irc.freenode.net/django http://thisweekindjango.com/ http://www.djangosnippets.org/ http://code.djangoproject.com/wiki/Tutorials • • • •
•