Skip to content

Commit 03bb450

Browse files
committed
updating django to have a separate section on ORM
1 parent fa2943d commit 03bb450

File tree

3 files changed

+77
-25
lines changed

3 files changed

+77
-25
lines changed

django.html

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ <h2>Why is Django a good web framework choice?</h2>
7777
<a href="http://www.jeffknupp.com/blog/2012/12/11/learning-python-via-django-considered-harmful/">learning Python by using Django is a bad idea</a>.
7878
However, that criticism is invalid if you take the time to learn the Python
7979
syntax and language semantics first before diving into web development.</p>
80-
<h2>Django resources</h2>
80+
<h2>Django tutorials</h2>
8181
<ul>
8282
<li>
8383
<p><a href="http://www.tangowithdjango.com/book/">Tango with Django</a> are a extensive
@@ -116,18 +116,6 @@ <h2>Django resources</h2>
116116
explains the architecture of the resulting set up and includes Chef scripts
117117
to automate the deployment.</p>
118118
</li>
119-
<li>
120-
<p><a href="http://reinout.vanrees.org/weblog/2014/05/06/making-faster.html">Making a specific Django app faster</a>
121-
is a Django performance blog post with some tips on measuring performance
122-
and optimizing based on the measured results.</p>
123-
</li>
124-
<li>
125-
<p><a href="http://django-debug-toolbar.readthedocs.org/en/1.2/">Django Debug Toolbar</a>
126-
is a powerful Django ORM database query inspection tool. Highly recommended
127-
during development to ensure you're writing reasonable query code.
128-
<a href="http://mtford.co.uk/blog/2/">Django Silk</a> is another inspection tool and
129-
has capabilities to do more than just SQL inspection.</p>
130-
</li>
131119
</ul>
132120
<h2>Django videos</h2>
133121
<ul>
@@ -152,6 +140,44 @@ <h2>Django videos</h2>
152140
all available free of charge.</p>
153141
</li>
154142
</ul>
143+
<h2>Django ORM resources</h2>
144+
<p>The <a href="https://docs.djangoproject.com/en/dev/topics/db/">Django ORM</a> works well
145+
for simple and medium-complexity database operations. However, there are often
146+
complaints that the ORM makes complex queries much more complicated than
147+
writing straight SQL or using <a href="http://www.sqlalchemy.org/">SQLAlchemy</a>. </p>
148+
<p>It's technically possible to drop down to SQL but it ties the queries to a
149+
specific database implementation. The ORM is coupled closely with Django so
150+
replacing the default ORM with SQLAlchemy is currently a hack workaround. Note
151+
though that some of the Django core committers believe it is only a matter of
152+
time before the default ORM is replaced with SQLAlchemy. It will be a large
153+
effort to get that working though so it's likely to come in Django 1.9 or
154+
later.</p>
155+
<p>Since the majority of Django projects are tied to the default ORM, it's best to
156+
read up on advanced use cases and tools for doing your best work within the
157+
existing framework.</p>
158+
<ul>
159+
<li>
160+
<p><a href="http://django-debug-toolbar.readthedocs.org/en/1.2/">Django Debug Toolbar</a>
161+
is a powerful Django ORM database query inspection tool. Highly recommended
162+
during development to ensure you're writing reasonable query code.
163+
<a href="http://mtford.co.uk/blog/2/">Django Silk</a> is another inspection tool and
164+
has capabilities to do more than just SQL inspection.</p>
165+
</li>
166+
<li>
167+
<p><a href="http://reinout.vanrees.org/weblog/2014/05/06/making-faster.html">Making a specific Django app faster</a>
168+
is a Django performance blog post with some tips on measuring performance
169+
and optimizing based on the measured results.</p>
170+
</li>
171+
<li>
172+
<p><a href="https://speakerdeck.com/alex/why-i-hate-the-django-orm">Why I Hate the Django ORM</a>
173+
is Alex Gaynor's overview of the bad designs decisions, some of which he
174+
made, while building the Django ORM.</p>
175+
</li>
176+
<li>
177+
<p><a href="https://speakerdeck.com/craigkerstiens/going-beyond-django-orm-with-postgres">Going Beyond Django ORM with Postgres</a>
178+
is specific to using PostgreSQL with Django.</p>
179+
</li>
180+
</ul>
155181
<h2>Open source Django example projects</h2>
156182
<ul>
157183
<li>

feeds/all.atom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<feed xmlns="http://www.w3.org/2005/Atom"><title>Matt Makai</title><link href="http://www.fullstackpython.com/" rel="alternate"></link><link href="http://www.fullstackpython.com/feeds/all.atom.xml" rel="self"></link><id>http://www.fullstackpython.com/</id><updated>2014-06-22T09:41:46Z</updated></feed>
2+
<feed xmlns="http://www.w3.org/2005/Atom"><title>Matt Makai</title><link href="http://www.fullstackpython.com/" rel="alternate"></link><link href="http://www.fullstackpython.com/feeds/all.atom.xml" rel="self"></link><id>http://www.fullstackpython.com/</id><updated>2014-06-23T08:43:15Z</updated></feed>

source/content/pages/02-web-frameworks/0203-django.markdown

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ However, that criticism is invalid if you take the time to learn the Python
6666
syntax and language semantics first before diving into web development.
6767

6868

69-
## Django resources
69+
## Django tutorials
7070
* [Tango with Django](http://www.tangowithdjango.com/book/) are a extensive
7171
free introductions to using the most popular Python web framework. Several
7272
current developers said this book really helped them get over the initial
@@ -96,16 +96,6 @@ syntax and language semantics first before diving into web development.
9696
explains the architecture of the resulting set up and includes Chef scripts
9797
to automate the deployment.
9898

99-
* [Making a specific Django app faster](http://reinout.vanrees.org/weblog/2014/05/06/making-faster.html)
100-
is a Django performance blog post with some tips on measuring performance
101-
and optimizing based on the measured results.
102-
103-
* [Django Debug Toolbar](http://django-debug-toolbar.readthedocs.org/en/1.2/)
104-
is a powerful Django ORM database query inspection tool. Highly recommended
105-
during development to ensure you're writing reasonable query code.
106-
[Django Silk](http://mtford.co.uk/blog/2/) is another inspection tool and
107-
has capabilities to do more than just SQL inspection.
108-
10999

110100
## Django videos
111101
* [GoDjango](https://godjango.com/) screencasts and tutorials are free short
@@ -125,6 +115,42 @@ syntax and language semantics first before diving into web development.
125115
all available free of charge.
126116

127117

118+
## Django ORM resources
119+
The [Django ORM](https://docs.djangoproject.com/en/dev/topics/db/) works well
120+
for simple and medium-complexity database operations. However, there are often
121+
complaints that the ORM makes complex queries much more complicated than
122+
writing straight SQL or using [SQLAlchemy](http://www.sqlalchemy.org/).
123+
124+
It's technically possible to drop down to SQL but it ties the queries to a
125+
specific database implementation. The ORM is coupled closely with Django so
126+
replacing the default ORM with SQLAlchemy is currently a hack workaround. Note
127+
though that some of the Django core committers believe it is only a matter of
128+
time before the default ORM is replaced with SQLAlchemy. It will be a large
129+
effort to get that working though so it's likely to come in Django 1.9 or
130+
later.
131+
132+
Since the majority of Django projects are tied to the default ORM, it's best to
133+
read up on advanced use cases and tools for doing your best work within the
134+
existing framework.
135+
136+
* [Django Debug Toolbar](http://django-debug-toolbar.readthedocs.org/en/1.2/)
137+
is a powerful Django ORM database query inspection tool. Highly recommended
138+
during development to ensure you're writing reasonable query code.
139+
[Django Silk](http://mtford.co.uk/blog/2/) is another inspection tool and
140+
has capabilities to do more than just SQL inspection.
141+
142+
* [Making a specific Django app faster](http://reinout.vanrees.org/weblog/2014/05/06/making-faster.html)
143+
is a Django performance blog post with some tips on measuring performance
144+
and optimizing based on the measured results.
145+
146+
* [Why I Hate the Django ORM](https://speakerdeck.com/alex/why-i-hate-the-django-orm)
147+
is Alex Gaynor's overview of the bad designs decisions, some of which he
148+
made, while building the Django ORM.
149+
150+
* [Going Beyond Django ORM with Postgres](https://speakerdeck.com/craigkerstiens/going-beyond-django-orm-with-postgres)
151+
is specific to using PostgreSQL with Django.
152+
153+
128154
## Open source Django example projects
129155
* [Txt 2 React](https://github.com/makaimc/txt2react) is a full Django web
130156
app that allows audiences to text in during a presentation with feedback

0 commit comments

Comments
 (0)