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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
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
中期計画、2回作ってみた ~業務委託と正社員、両方の視点から~
demaecan
1
870
自律型AIエージェントは何を破壊するのか
kojira
0
160
不要なレビューをAIにまかせて AIコーディングの環境改善を加速した
shoota
1
130
新しいVibe Codingと”自走”について
watany
6
330
日本 Fintech 未来予測レポート 2027〜2028年(手動編集版)
8maki
0
2.3k
エンジニアリング戦略の作り方 / Crafting Engineering Strategy
iwashi86
21
7k
入門!AWS Blocks
ysuzuki
1
130
2026年6月23日 Syncable Tech + Start Python Club にて
hamukazu
0
110
日本 Fintech 未来予測レポート 2027〜2028年(オリジナル版)
8maki
0
2.2k
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
6
2k
マルチアカウント環境での コーディングエージェントを使った障害調査が大変なので AIエージェントにReadOnly権限を付与してみた / ReadOnly AI Agents for Multi-Account AWS Incident Response
yamaguchitk333
2
110
攻撃者視点で考えるDetection Engineering
cryptopeg
3
1.8k
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Skip the Path - Find Your Career Trail
mkilby
1
150
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.4k
Abbi's Birthday
coloredviolet
2
8.1k
Ruling the World: When Life Gets Gamed
codingconduct
0
250
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
360
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.9k
30 Presentation Tips
portentint
PRO
1
320
Context Engineering - Making Every Token Count
addyosmani
9
960
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 • • • •
•