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
330
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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.7k
Yes We Did: Reelecting Obama.
dryan
1
510
5 Ways to Embrace HTML5 Today
dryan
5
250
CSS3: Possibilities, Best Practices and Pitfalls
dryan
1
140
CSS for Mobile
dryan
2
210
Other Decks in Technology
See All in Technology
Invisible to AI? Making TYPO3 Sites Quotable by AI Search Systems
wolfgangwagner
0
240
現場回帰したデータエンジニアが考える AI 時代のキャリア開発 / Career Development in the Age of AI Perspectives from a Hands-on Data Engineer
medley
0
300
AIに狂うスタートアップが、あえて「人との協働」に全振りした新卒エンジニア研修 / New Graduate Engineer Training at a Startup Accelerating AI Adoption
ohnoeight
0
170
Master Dataグループ紹介資料
sansan33
PRO
1
4.8k
【GCC2026】大規模言語モデルを活用した内製検索サービスの社内展開や業務活用
bandainamcostudios
PRO
0
390
関東Kaggler会発表資料
takoi
1
270
属人化を叩き割れ!「制作加速」と「安定化」の矛盾を打破する:8年目プロダクトが辿り着いた「ミスが起こり得ない」アセット制作フローの全貌
gree_tech
PRO
0
120
Genie Codeハンズオン応用編
taka_aki
0
140
35分でわかるEffective Platform Engineering
nwiizo
5
570
Go 1.27 の標準パッケージに uuid が入った!のでいろいろ喋る / go_127_std_go_uuid
convto
3
560
Head First モブプログラミング / Head First Mobprogramming
takaking22
10
12k
AI時代のアウトプット――変わったこと、変わらないこと / Devsumi 2026 Kansai #devsumi
jnchito
0
430
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
Ethics towards AI in product and experience design
skipperchong
2
350
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.2k
AI: The stuff that nobody shows you
jnunemaker
PRO
9
930
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
390
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
660
What's in a price? How to price your products and services
michaelherold
247
13k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
370
Discover your Explorer Soul
emna__ayadi
2
1.3k
Ruling the World: When Life Gets Gamed
codingconduct
0
310
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.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 • • • •
•