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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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.6k
Yes We Did: Reelecting Obama.
dryan
1
460
5 Ways to Embrace HTML5 Today
dryan
5
240
CSS3: Possibilities, Best Practices and Pitfalls
dryan
1
130
CSS for Mobile
dryan
2
190
Other Decks in Technology
See All in Technology
EventBridge API Destination × AgentCore Runtimeで実現するLambdaレスなイベント駆動エージェント
har1101
7
290
Digitization部 紹介資料
sansan33
PRO
1
6.7k
SREのプラクティスを用いた3領域同時 マネジメントへの挑戦 〜SRE・情シス・セキュリティを統合した チーム運営術〜
coconala_engineer
1
370
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
41k
GSIが複数キー対応したことで、俺達はいったい何が嬉しいのか?
smt7174
3
120
AIとともに歩む情報セキュリティ / Information Security with AI
kanny
4
3k
最速で価値を出すための プロダクトエンジニアのツッコミ術
kaacun
1
470
小さく始めるBCP ― 多プロダクト環境で始める最初の一歩
kekke_n
0
220
Kubecon NA 2025: DRA 関連の Recap と社内 GPU 基盤での課題
kevin_namba
0
100
いよいよ仕事を奪われそうな波が来たぜ
kazzpapa3
3
310
Amazon ElastiCacheのコスト最適化を考える/Elasticache Cost Optimization
quiver
0
350
月間数億レコードのアクセスログ基盤を無停止・低コストでAWS移行せよ!アプリケーションエンジニアのSREチャレンジ💪
miyamu
0
590
Featured
See All Featured
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
54
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.7k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
We Are The Robots
honzajavorek
0
150
How to train your dragon (web standard)
notwaldorf
97
6.5k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
440
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
93
YesSQL, Process and Tooling at Scale
rocio
174
15k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
230
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
54
Art, The Web, and Tiny UX
lynnandtonic
304
21k
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 • • • •
•