<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Django Site Module</title>
	<link>http://leahculver.com/2007/07/17/django-site-module/</link>
	<description>leahculver.com</description>
	<pubDate>Wed, 03 Dec 2008 22:44:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
		<item>
		<title>By: Duc Nguyen</title>
		<link>http://leahculver.com/2007/07/17/django-site-module/#comment-674</link>
		<dc:creator>Duc Nguyen</dc:creator>
		<pubDate>Thu, 26 Jul 2007 01:57:24 +0000</pubDate>
		<guid>http://leahculver.com/2007/07/17/django-site-module/#comment-674</guid>
		<description>Do you use any special IDE to write your python code?  It seems outside of pydev or wingide, there aren't really any good python IDE's.  Pydev and wingide aren't that good anyways, so I've went back to using good old emacs to do the job.</description>
		<content:encoded><![CDATA[<p>Do you use any special IDE to write your python code?  It seems outside of pydev or wingide, there aren&#8217;t really any good python IDE&#8217;s.  Pydev and wingide aren&#8217;t that good anyways, so I&#8217;ve went back to using good old emacs to do the job.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Johnson Rice</title>
		<link>http://leahculver.com/2007/07/17/django-site-module/#comment-672</link>
		<dc:creator>Johnson Rice</dc:creator>
		<pubDate>Thu, 19 Jul 2007 03:14:06 +0000</pubDate>
		<guid>http://leahculver.com/2007/07/17/django-site-module/#comment-672</guid>
		<description>Doubtfully a good time...

I'm just thinking the "Public" "Private" and "# Recipients" labels on each message should be subtly color coded so they stand out slightly more.

At least private messages should be... I'd like to know a little more clearly when a message is directed AT me specifically, or from me to someone specifically.

Although, that suggestion is probably ill timed and out of place here... Maybe.. I dunno. *shrug*</description>
		<content:encoded><![CDATA[<p>Doubtfully a good time&#8230;</p>
<p>I&#8217;m just thinking the &#8220;Public&#8221; &#8220;Private&#8221; and &#8220;# Recipients&#8221; labels on each message should be subtly color coded so they stand out slightly more.</p>
<p>At least private messages should be&#8230; I&#8217;d like to know a little more clearly when a message is directed AT me specifically, or from me to someone specifically.</p>
<p>Although, that suggestion is probably ill timed and out of place here&#8230; Maybe.. I dunno. *shrug*</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://leahculver.com/2007/07/17/django-site-module/#comment-671</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Thu, 19 Jul 2007 01:26:48 +0000</pubDate>
		<guid>http://leahculver.com/2007/07/17/django-site-module/#comment-671</guid>
		<description>Django ate my baby!

(I had to say it)</description>
		<content:encoded><![CDATA[<p>Django ate my baby!</p>
<p>(I had to say it)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leah Culver</title>
		<link>http://leahculver.com/2007/07/17/django-site-module/#comment-670</link>
		<dc:creator>Leah Culver</dc:creator>
		<pubDate>Wed, 18 Jul 2007 21:27:00 +0000</pubDate>
		<guid>http://leahculver.com/2007/07/17/django-site-module/#comment-670</guid>
		<description>Bob and Jacob - thanks for the tip about caching the context processors! I'll do that.</description>
		<content:encoded><![CDATA[<p>Bob and Jacob - thanks for the tip about caching the context processors! I&#8217;ll do that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob Ippolito</title>
		<link>http://leahculver.com/2007/07/17/django-site-module/#comment-669</link>
		<dc:creator>Bob Ippolito</dc:creator>
		<pubDate>Wed, 18 Jul 2007 17:21:07 +0000</pubDate>
		<guid>http://leahculver.com/2007/07/17/django-site-module/#comment-669</guid>
		<description>I'm not sure what the request model looks like for Django, but we cache read-only queries like this in the request object so that it only gets fetched once per request. There's also a tier of memcached between our webapps and the database, but making sure cached stuff doesn't go stale is tricky.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure what the request model looks like for Django, but we cache read-only queries like this in the request object so that it only gets fetched once per request. There&#8217;s also a tier of memcached between our webapps and the database, but making sure cached stuff doesn&#8217;t go stale is tricky.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jacob Kaplan-Moss</title>
		<link>http://leahculver.com/2007/07/17/django-site-module/#comment-668</link>
		<dc:creator>Jacob Kaplan-Moss</dc:creator>
		<pubDate>Wed, 18 Jul 2007 16:52:15 +0000</pubDate>
		<guid>http://leahculver.com/2007/07/17/django-site-module/#comment-668</guid>
		<description>@Leah: ah, that makes sense -- context processors are executed each time a context (er, a RequestContext, that is) is initialized; depending on how things are written multiple contexts could be created on each request.

Sounds like your fix was easy enough; it should also be trivial to modify the context processor to cache its data (it's a good practice to cache things like context processors if possible since it can be hard to predict how often they'll get called).

@Mark: you're probably just trolling, but I'll pretend you asked a question: when you do an ORM lookup in Django it selects all columns by default (including whatever columns you used in the lookup). That's because the time it takes for a database to return all columns is almost identical to the time it takes to return a subset of columns. In fact, in some edge cases fewer columns can actually be slower.

Oh, and Django enumerates the columns explicitly because SELECT * is evil.</description>
		<content:encoded><![CDATA[<p>@Leah: ah, that makes sense &#8212; context processors are executed each time a context (er, a RequestContext, that is) is initialized; depending on how things are written multiple contexts could be created on each request.</p>
<p>Sounds like your fix was easy enough; it should also be trivial to modify the context processor to cache its data (it&#8217;s a good practice to cache things like context processors if possible since it can be hard to predict how often they&#8217;ll get called).</p>
<p>@Mark: you&#8217;re probably just trolling, but I&#8217;ll pretend you asked a question: when you do an ORM lookup in Django it selects all columns by default (including whatever columns you used in the lookup). That&#8217;s because the time it takes for a database to return all columns is almost identical to the time it takes to return a subset of columns. In fact, in some edge cases fewer columns can actually be slower.</p>
<p>Oh, and Django enumerates the columns explicitly because SELECT * is evil.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jared</title>
		<link>http://leahculver.com/2007/07/17/django-site-module/#comment-667</link>
		<dc:creator>Jared</dc:creator>
		<pubDate>Wed, 18 Jul 2007 13:01:03 +0000</pubDate>
		<guid>http://leahculver.com/2007/07/17/django-site-module/#comment-667</guid>
		<description>You know, you wouldn't having this problem if you'd used Ruby on Rails. Sorry, I had to. Blame Canada? P.S. Hello from a fellow Minnesotan.</description>
		<content:encoded><![CDATA[<p>You know, you wouldn&#8217;t having this problem if you&#8217;d used Ruby on Rails. Sorry, I had to. Blame Canada? P.S. Hello from a fellow Minnesotan.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Uros Trebec</title>
		<link>http://leahculver.com/2007/07/17/django-site-module/#comment-666</link>
		<dc:creator>Uros Trebec</dc:creator>
		<pubDate>Wed, 18 Jul 2007 11:09:54 +0000</pubDate>
		<guid>http://leahculver.com/2007/07/17/django-site-module/#comment-666</guid>
		<description>Leah - I had the same problem and found a fairly simple solution...
I've added the two variables to the settings.py file

ie.:
SITE_NAME = 'Something'
SITE_URL = 'http://something.com'

and then import them into context_processors.py with:
from django.conf import settings.SITE_NAME, settings.SITE_URL

This works really well for one-site projects (the majority of my sites). While I do understand the usefulness of contrib.sites for larger multi-sites, I think there's too much overhead for one-site projects.

BTW, great job with Pownce! I've just got my invite yesterday and have yet to get my friends to join, but I like it so far.</description>
		<content:encoded><![CDATA[<p>Leah - I had the same problem and found a fairly simple solution&#8230;<br />
I&#8217;ve added the two variables to the settings.py file</p>
<p>ie.:<br />
SITE_NAME = &#8216;Something&#8217;<br />
SITE_URL = &#8216;http://something.com&#8217;</p>
<p>and then import them into context_processors.py with:<br />
from django.conf import settings.SITE_NAME, settings.SITE_URL</p>
<p>This works really well for one-site projects (the majority of my sites). While I do understand the usefulness of contrib.sites for larger multi-sites, I think there&#8217;s too much overhead for one-site projects.</p>
<p>BTW, great job with Pownce! I&#8217;ve just got my invite yesterday and have yet to get my friends to join, but I like it so far.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arne</title>
		<link>http://leahculver.com/2007/07/17/django-site-module/#comment-665</link>
		<dc:creator>Arne</dc:creator>
		<pubDate>Wed, 18 Jul 2007 07:48:18 +0000</pubDate>
		<guid>http://leahculver.com/2007/07/17/django-site-module/#comment-665</guid>
		<description>I tried to remove the sites module from my django project to but then the flatpages fallback middleware complained, because there is a dependency on the sites module ...</description>
		<content:encoded><![CDATA[<p>I tried to remove the sites module from my django project to but then the flatpages fallback middleware complained, because there is a dependency on the sites module &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: robert</title>
		<link>http://leahculver.com/2007/07/17/django-site-module/#comment-664</link>
		<dc:creator>robert</dc:creator>
		<pubDate>Wed, 18 Jul 2007 05:25:30 +0000</pubDate>
		<guid>http://leahculver.com/2007/07/17/django-site-module/#comment-664</guid>
		<description>you know those posts you wrote about computer science classes?  i wish my school would have merged programming and sql courses, now i know how to do sql, and i know how to program but i don't know how to make them work together well.</description>
		<content:encoded><![CDATA[<p>you know those posts you wrote about computer science classes?  i wish my school would have merged programming and sql courses, now i know how to do sql, and i know how to program but i don&#8217;t know how to make them work together well.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
