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
320
2
Share
Developing with Django
A "get started" guide to Django powered websites.
Daniel Ryan
October 22, 2011
More Decks by Daniel Ryan
See All by Daniel Ryan
Human-first Web Design
dryan
11
2.6k
Yes We Did: Reelecting Obama.
dryan
1
490
5 Ways to Embrace HTML5 Today
dryan
5
250
CSS3: Possibilities, Best Practices and Pitfalls
dryan
1
140
CSS for Mobile
dryan
2
200
Other Decks in Technology
See All in Technology
NFLコンペ2026 解法
lycorptech_jp
PRO
0
120
AIが変えた"品質の守り方"
kkakizaki
13
5.2k
最低限これだけ押さえれ大丈夫_Claude Enterprise/Team企業展開ガバナンス入門
tkikuchi
1
450
Don't Just Patch — MOTTAINAI! Learn Security from Laravel CVE Diffs
codmoninc
0
150
「使われるデータ基盤」を目指してデータアナリストとワークショップをやった話
jackojacko_
2
920
Dynamic Workersについて
yusukebe
1
330
Claude Code x Accounting
kawaguti
PRO
1
340
Cloud Run のアップデート 触ってみる&紹介
gre212
0
210
Copilot CLI・IDE・Web・スマホで途切れない開発フローを目指して / One Copilot flow - CLI IDE Web Mobile
aeonpeople
1
1.1k
eBPF Can Do It! A 5-Minute Tour of 5 Real-World PHP Issues Solved with eBPF
egmc
0
330
A Harness for Behaviour: how to get AI to generate code that does what we intend, or "TDD in the age of AI"
xpmatteo
0
490
自称宇宙最速で不合格となったAIP-C01にリベンジを果たすべくAIで問題集アプリを作ってみた。
yama3133
0
230
Featured
See All Featured
First, design no harm
axbom
PRO
2
1.2k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Discover your Explorer Soul
emna__ayadi
2
1.1k
Navigating Team Friction
lara
192
16k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1.1k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Why Our Code Smells
bkeepers
PRO
340
58k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
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 • • • •
•