-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschedule-presentations-52.html
183 lines (178 loc) · 11.3 KB
/
schedule-presentations-52.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
---
permalink: /schedule/presentations/52/
title: 'DjangoCon US : Presentation: The Dungeon Master''s guide to Django''s ORM'
---
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8"/>
<title>DjangoCon US : Presentation: The Dungeon Master's guide to Django's ORM</title>
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<link href="../../../static/css/bde01dea2fa1.css" rel="stylesheet" type="text/css"/>
<!-- HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="https://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link href="../../../static/img/favicon.png" rel="shortcut icon"/>
<style>
a.unbookmark {
text-decoration: none;
padding-left: 20px;
background: url(http://2012.djangocon.us/static/img/star.png) no-repeat left;
}
a.bookmark {
text-decoration: none;
padding-left: 20px;
background: url(http://2012.djangocon.us/static/img/star_unselected.png) no-repeat left;
}
div.slot {
font-weight: bold;
}
</style>
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport"/>
</head>
<body class="talk_detail" id="">
<header id="site_header">
<h1><a href="../../../index.html">DjangoCon US 2012 - Washington, DC</a></h1>
<div id="account-bar">
<a href="../../../account/login/index.html">Log in</a> or <a href="../../../account/signup/index.html">Sign Up</a>
</div>
<nav id="site_nav">
<ul>
<li class="register_tab"><a href="http://djangoconus2012.eventbrite.com/">Register</a></li>
<li class="schedule_tab"><a href="../../index.html">Schedule</a></li>
<li class="venue_tab"><a href="../../../venue/index.html">Venue</a></li>
<li class="sponsors_tab"><a href="../../../sponsors/index.html">Sponsors</a></li>
<li class="lightning_tab"><a href="../../../lightning/index.html">Lightning Talks</a></li>
<li class="sprints_tab"><a href="../../../sprints/index.html">Sprints</a></li>
<li class="openspaces_tab"><a href="../../../open-spaces/index.html">Open Spaces</a></li>
<li class="about_tab"><a href="../../../about/index.html">About</a></li>
<li class="tutorials_tab"><a href="../../../tutorials/index.html">Tutorials</a></li>
</ul>
</nav>
</header>
<section id="main_content">
<h1 class="talk_title">The Dungeon Master's guide to Django's ORM</h1>
<section class="meta">
A Talk presented by
<a href="../../../speaker/profile/88/index.html">Malcolm Tredinnick</a>
<div id="personal">
<a href="../../../account/login/index.html@next=%25252Fschedule%25252Fpresentations%25252F52%25252F.html">log in</a> to bookmark.
</div>
</section>
<h3>Audience level</h3>
<p>Experienced</p>
<h3>Category</h3>
<p>Django Internals</p>
<h3>Time</h3>
<p>September 5th, 11:05 a.m. – 11:45 a.m.</p>
<hr/>
<h3>Description</h3>
<p class="description">If you've ever been curious about Django's ORM implementation, you will have noticed the required learning curve. Some of the code is fairly complicated. Other bits are worse. Here comes a 30 or 40 minute guided tour of the uncharted realms: how the pieces fit together, where to look for things, why the current design is what it is. A portion of this is my fault; I should probably explain myself.</p>
<hr/>
<div>
<h2>Abstract</h2>
</div>
<div class="abstract"><p>Django's database layer is a necessarily complicated piece of code. It is a very powerful API that works more or less seamlessly across multiple database storage systems, smoothing over many of the inconsistencies and implementation differences that go with the territory. This is great for developers who use Django.</p>
<p>It's a little less awesome for the maintainers of that code; working in that environment is fairly difficult. Still, we all like a challenge. Problem is: where to start? Coming to grips with the ORM code isn't easy. The code is well written and documented, but the entry points are particularly well highlighted and, really, the sheer mass of code is an obstacle to be overcome.</p>
<p>This talk will look at the various layers of the ORM, from the public gateways, to the semi-public doors into the implementation, to the deeper internals and down to the interaction with databases. In effect, following the journey of a couple of adventurous young queries as they traverse the pathways to bring back some data, smelted into just the right format.</p>
<p>The goal is to provide some kind of mental map of the code. Some tips for orienting yourself in the future and how to examine new nooks and corners without losing your mind. We obviously cannot cover everything, but let's go over the common paths and show how the other pieces hang off that backbone.</p>
<p>Along the way, we'll put some of the details into historical perspective. Getting inside the mind of previous adventurers might help understand why things are the way they are.</p></div>
</section>
<div id="footer">
<div class="inner">
<div class="container">
<hr/>
<footer id="page_footer">
<section id="page_sponsors">
<h3>Sponsors</h3>
<a href="http://www.newrelic.com/"><img alt="New Relic, Inc." src="../../../media/cache/ad/9c/ad9ca4f829a01fbf5d9c3915d47fd26a.jpg"/></a>
<a href="http://cmgdigital.com/"><img alt="CMG Digital" src="../../../media/cache/f0/d7/f0d758d236ec6dc4b164c730a8e69bdd.jpg"/></a>
<a href="http://www.revsys.com/"><img alt="Revolution Systems" src="../../../media/cache/7d/bf/7dbfe4e3b375fb938cef12c7e756b2fa.jpg"/></a>
<a href="http://www.jetbrains.com/pycharm/"><img alt="Jet Brains" src="../../../media/cache/87/66/87664ff9a841cb55780a33310824b904.jpg"/></a>
<a href="http://www.caktusgroup.com/"><img alt="Caktus Consulting Group, LLC" src="../../../media/cache/be/e4/bee4e0b8539a7dfd3895a00bd1f0f638.jpg"/></a>
<a href="http://www.webcubecms.com/"><img alt="Web Cube" src="../../../media/cache/f8/a4/f8a473da2393bfb101699663b8abc553.jpg"/></a>
<a href="http://www.chicagodjango.com/"><img alt="Imaginary Landscape, LLC" src="../../../media/cache/32/7f/327fc581684a89a146cb9d7edd811ebe.jpg"/></a>
<a href="http://www.github.com/"><img alt="GitHub" src="../../../media/cache/6c/bf/6cbf65587c1e36b49317514ae45a1254.jpg"/></a>
<a href="https://www.counsyl.com/"><img alt="Counsyl" src="../../../media/cache/6b/46/6b46a0cd033de096b0ef067d8259820a.jpg"/></a>
<a href="http://caci.com./"><img alt="CACI" src="../../../media/cache/b2/37/b2370064505dcb72291927c0a73467bc.jpg"/></a>
<a href="http://www.teamcarney.com/default.aspx?utm_source=djangocon&utm_medium=banner&utm_campaign=djangocon"><img alt="Carney" src="../../../media/cache/8b/4b/8b4bb5bf17d464c85f27a09a59d0e274.jpg"/></a>
<a href="http://celerity.com/"><img alt="Celerity" src="../../../media/cache/da/1f/da1f620155d4b81266888cb4ca6fad1c.jpg"/></a>
<a href="http://lab305.com/"><img alt="Lab 305" src="../../../media/cache/07/48/0748738521108c82f10fe19726e37849.jpg"/></a>
<a href="http://www.wisertogether.com/"><img alt="Wiser Together" src="../../../media/cache/37/5a/375a48e8fcecb60a7a89d3e74c236367.jpg"/></a>
<a href="http://www.mozilla.com/"><img alt="Mozilla" src="../../../media/cache/4c/a4/4ca41c7eee1175790a957bafb4461b84.jpg"/></a>
<a href="http://tryolabs.com/"><img alt="Tryolabs" src="../../../media/cache/e5/f9/e5f9d4bf7df2edc3b8d632246b90da8f.jpg"/></a>
<a href="http://socialcodeinc.com/"><img alt="SocialCode" src="../../../media/cache/e6/c6/e6c6e0e96aabfc673739e196a3f42497.jpg"/></a>
<a href="http://toastdriven.com/"><img alt="Toast Driven" src="../../../media/cache/60/c0/60c0674b42a339f11f6ae9cf32401556.jpg"/></a>
<a href="http://www.devsar.com/"><img alt="Devsar" src="../../../media/cache/74/44/74448dd5c58c1499811cfdaded3daf3b.jpg"/></a>
<a href="http://lincolnloop.com/"><img alt="Lincoln Loop" src="../../../media/cache/ad/83/ad831d1142c5a4cf59b7e943e5398ee6.jpg"/></a>
<a href="http://www.stickermule.com/"><img alt="Sticker Mule" src="../../../media/cache/ef/39/ef3954931c41170fe37abde34dda6c29.jpg"/></a>
<a href="http://unifiedsocial.com/"><img alt="Unified" src="../../../media/cache/0a/59/0a5923d4975f4326bead3e38de0c50db.jpg"/></a>
<a href="http://theopenbastion.com/"><img alt="The Open Bastion" src="../../../media/cache/12/34/1234b43bbc5a7db6efd6a2cdcaa6ca90.jpg"/></a>
<a href="http://www.chicagodjango.com/"><img alt="Imaginary Landscape" src="../../../media/cache/84/81/8481bde3f62f559916ba24b83d59ac6c.jpg"/></a>
</section>
<hr/>
<p>DjangoCon US 2012 is a production of <a href="http://theopenbastion.com">The Open Bastion</a>.</p>
<p><strong>Django</strong> is a registered trademark of the <a href="http://djangoproject.com/foundation">Django Software Foundation</a>.</p>
<p>Questions? Comments? <a href="mailto:[email protected]">[email protected]</a>.</p>
</footer>
</div>
</div>
</div>
<script src="../../../static/pinax/js/jquery-1.7.1.min.js"></script>
<script src="../../../static/pinax/js/jquery.form.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-alert.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-modal.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-button.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-carousel.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-collapse.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-dropdown.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-scrollspy.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-tab.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-tooltip.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-popover.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-transition.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-typeahead.js"></script>
<script src="../../../static/pinax/js/theme.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("a.bookmark").live("click", function() {
aElem = $(this);
instructions = aElem.next(".instructions")
$.ajax({
type: "POST",
url: this.href,
data: "action=add;csrfmiddlewaretoken=844d93ba92ff165d207fd1c6c0c115f7",
success: function() {
aElem.removeClass("bookmark");
aElem.addClass("bookmarked");
instructions.html("← click to unbookmark");
},
error: function(xhr, options, error) {
alert(xhr.status);
}
});
return false;
});
$("a.bookmarked").live("click", function() {
aElem = $(this);
instructions = aElem.next(".instructions")
$.ajax({
type: "POST",
url: this.href,
data: "action=delete;csrfmiddlewaretoken=844d93ba92ff165d207fd1c6c0c115f7",
success: function(response) {
aElem.removeClass("bookmarked");
aElem.addClass("bookmark");
instructions.html("← click to bookmark")
},
error: function(xhr, options, error) {
alert(xhr.status);
}
});
return false;
});
});
</script>
</body>
</html>