Stupid template question

2007-12-13 Thread Steve Freitas
I have a dictionary, and I'd like to iterate over the keys, using the keys to look up the result, like: {% for key in myDict %} The key is {{key}} and the value is {{myDict.key}}. {% endfor %} Only, it doesn't work. It seems like . lookups require the argument to be a literal, not a variable.

Re: mod_python delivering form data to wrong Django instance?

2007-11-16 Thread Steve Freitas
On Fri, 2007-11-16 at 18:55 -0800, Graham Dumpleton wrote: > Python leaks environment variables between sub interpreters in certain > circumstances based on the order in which the sub interpreters are > created. > > It is described a bit in section 'Application Environment Variables' > of: > >

mod_python delivering form data to wrong Django instance?

2007-11-16 Thread Steve Freitas
Hi all, Yes, I realize that maybe this should go to the mod_python list instead, but I wanted to rule Django out first. Here's my configuration, with Apache2 on Linux (sorry I couldn't make this shorter): I've got four Django sites I host under different domain names, which are actually all

Re: Getting a sum using an active QuerySet?

2007-11-09 Thread Steve Freitas
Thanks so much for your response, Russell. On Sat, 2007-11-10 at 12:10 +0900, Russell Keith-Magee wrote: > 1) Get hold of a cursor and write the full SQL query you want > yourself. It sounds like all you want is SELECT SUM(bar) FROM MYTABLE, > so this may be the easiest and most stable solution.

Getting a sum using an active QuerySet?

2007-11-09 Thread Steve Freitas
Hi all, I'm looking to get the sum of a column. I've seen plenty of examples which illustrate using a QuerySet's extra(select={'foo': 'sum(bar)'}) method, but my Postgres pukes on that: ERROR: column "app_model.id" must appear in the GROUP BY clause or be used in an aggregate function After

Re: Broken pipes with HttpResponseRedirect and Firefox / Trouble in paradise

2007-05-26 Thread Steve Freitas
On Fri, 2007-05-18 at 14:27 -0700, Jon Lesser wrote: > I tool Malcolm's advice and looked closely at the packets going back > and forth. Upon pressing an input button nested within an anchor, > Firefox was sending two identical requests to the server, thus causing > my code to be executed twice.