Re: Pick a value from list variable in templates

2008-03-04 Thread [EMAIL PROTECTED]
The __foo__ syntax just looks dumb to me, I say(barring some other brilliant idea) either make it a very simple default filter or let each developer make their own version, its like 5 lines of code. On Mar 5, 1:12 am, "vcc" <[EMAIL PROTECTED]> wrote: > - Original Message - > From: "Ian Ke

Re: logging & MODPYTHON

2008-03-04 Thread Thomas Guettler
AndrewD schrieb: > I would like to contribute a general Django logging system. I have > MODPYTHON logging working, & a basic file logging sample. I think most > Django users want easy logging out-of-the-box, and it meets the DRY > principle. > It would be great if setting up logging would be do

Re: Pick a value from list variable in templates

2008-03-04 Thread James Bennett
On Tue, Mar 4, 2008 at 1:37 PM, Lauri Ahonen <[EMAIL PROTECTED]> wrote: > Is there a sound technical reason not to add a filter, ie. is there a > performance penalty involved? Or is there a fundemental problem with the > design that I had in the first posting? I'm going to be adding this > functio

Re: Pick a value from list variable in templates

2008-03-04 Thread vcc
- Original Message - From: "Ian Kelly" <[EMAIL PROTECTED]> To: Sent: Wednesday, March 05, 2008 2:18 PM Subject: Re: Pick a value from list variable in templates > Besides, it introduces a naming conflict. When I write {{ foo.__bar__ > }}, do I mean `getattr(foo, bar)`, or do I just wan

Re: Pick a value from list variable in templates

2008-03-04 Thread Lauri Ahonen
On 3/4/08, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > > > On 3/4/08, Lauri Ahonen <[EMAIL PROTECTED]> wrote: > > Exactly. This seemed like such a basic concept (select from array based > on > > variable value) that I was sure that it's hidden in django somewhere. I > > can't be the first one to

Re: logging & MODPYTHON

2008-03-04 Thread Malcolm Tredinnick
On Tue, 2008-03-04 at 13:35 -0800, AndrewD wrote: > I would like to contribute a general Django logging system. I have > MODPYTHON logging working, & a basic file logging sample. I think most > Django users want easy logging out-of-the-box, and it meets the DRY > principle. For things like this,

Re: Pick a value from list variable in templates

2008-03-04 Thread Ian Kelly
On Tue, Mar 4, 2008 at 10:16 PM, vcc <[EMAIL PROTECTED]> wrote: > > vcc said the following: > >> How about: {{ foo.__bar__ }} ? > > > > Except you can't use _ as the first character in a template lookup like > > that, > > and the __foo__ naming method is already taken by existing things like

Re: logging & MODPYTHON

2008-03-04 Thread Jacob Kaplan-Moss
On 3/4/08, AndrewD <[EMAIL PROTECTED]> wrote: > I would like to contribute a general Django logging system. I have > MODPYTHON logging working, & a basic file logging sample. I think most > Django users want easy logging out-of-the-box, and it meets the DRY > principle. Please search the Djan

Re: Pick a value from list variable in templates

2008-03-04 Thread vcc
- Original Message - From: "Collin Grady" <[EMAIL PROTECTED]> To: Sent: Wednesday, March 05, 2008 12:49 PM Subject: Re: Pick a value from list variable in templates > > vcc said the following: >> How about: {{ foo.__bar__ }} ? > > Except you can't use _ as the first character in a tem

Re: Pick a value from list variable in templates

2008-03-04 Thread Collin Grady
vcc said the following: > How about: {{ foo.__bar__ }} ? Except you can't use _ as the first character in a template lookup like that, and the __foo__ naming method is already taken by existing things like __get__, __contains__, and other such methods/attributes :) -- Collin Grady Necessity

Re: Pick a value from list variable in templates

2008-03-04 Thread vcc
- Original Message - From: "Jacob Kaplan-Moss" <[EMAIL PROTECTED]> To: Sent: Wednesday, March 05, 2008 1:54 AM Subject: Re: Pick a value from list variable in templates > > On 3/4/08, Lauri Ahonen <[EMAIL PROTECTED]> wrote: >> Exactly. This seemed like such a basic concept (select from

Re: Ticket #6705

2008-03-04 Thread James Bennett
On Tue, Mar 4, 2008 at 9:22 PM, Dj Gilcrease <[EMAIL PROTECTED]> wrote: > he cant do something like http://dpaste.com/38006/ ? The desired case is for {{ form.errors }} to somehow do something similar, but automatically. -- "Bureaucrat Conrad, you are technically correct -- the best kind of c

Re: Ticket #6705

2008-03-04 Thread Collin Grady
Dj Gilcrease said the following: > On Tue, Mar 4, 2008 at 10:59 AM, James Bennett <[EMAIL PROTECTED]> wrote: >> Thoughts? > > he cant do something like http://dpaste.com/38006/ ? Should probably be field.label instead of field.label_tag, no? :) -- Collin Grady "I don't think so," said Descar

Re: Ticket #6705

2008-03-04 Thread Dj Gilcrease
On Tue, Mar 4, 2008 at 10:59 AM, James Bennett <[EMAIL PROTECTED]> wrote: > Thoughts? he cant do something like http://dpaste.com/38006/ ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group.

Re: Pick a value from list variable in templates

2008-03-04 Thread Malcolm Tredinnick
On Tue, 2008-03-04 at 19:23 +0200, Lauri Ahonen wrote: > > > On 3/4/08, Collin Grady <[EMAIL PROTECTED]> wrote: > > Luke Plant said the following: > > >> It is already in core. See: > >> > http://www.djangoproject.com/documentation/templates/#v

Ticket #6705

2008-03-04 Thread James Bennett
Ticket #6705 [1] proposes that 'form.errors' be changed to somehow provide a "prettier" display not based on the underlying field name (which is currently used as the key in the errors dictionary). The person who opened this ticket contends that it is a common issue, and that there is no existing

Re: Pick a value from list variable in templates

2008-03-04 Thread Patryk Zawadzki
On Tue, Mar 4, 2008 at 6:54 PM, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > Second, there's the question of weather this is a first-class > language-level feature or a filter. If it's the former, there's a > syntactic decision to be made; some have proposed something like ``{{ > foo.$bar }}

logging & MODPYTHON

2008-03-04 Thread AndrewD
I would like to contribute a general Django logging system. I have MODPYTHON logging working, & a basic file logging sample. I think most Django users want easy logging out-of-the-box, and it meets the DRY principle. This is already done & tested with Apache2. MODPYTHON Location: django/contrib/

Re: Pick a value from list variable in templates

2008-03-04 Thread Jacob Kaplan-Moss
On 3/4/08, Lauri Ahonen <[EMAIL PROTECTED]> wrote: > Exactly. This seemed like such a basic concept (select from array based on > variable value) that I was sure that it's hidden in django somewhere. I > can't be the first one to need this? The problem is, unfortunately, a lot more thorny than it

Re: Pick a value from list variable in templates

2008-03-04 Thread James Bennett
On Tue, Mar 4, 2008 at 11:23 AM, Lauri Ahonen <[EMAIL PROTECTED]> wrote: > Exactly. This seemed like such a basic concept (select from array based on > variable value) that I was sure that it's hidden in django somewhere. I > can't be the first one to need this? Yes and no. The thing is that a Py

Re: Pick a value from list variable in templates

2008-03-04 Thread Lauri Ahonen
On 3/4/08, Collin Grady <[EMAIL PROTECTED]> wrote: > > > Luke Plant said the following: > > >> It is already in core. See: > >> http://www.djangoproject.com/documentation/templates/#variables > > > >No, it isn't - {{ foo.bar }} is the same as foo['bar'] not foo[bar], so > it won't > >do what they'

Re: routing to a log file when daemonizing a fastcgi process

2008-03-04 Thread jedie
On 29 Feb., 21:38, tamas kemenczy <[EMAIL PROTECTED]> wrote: > Recently at work I've encountered a need to be able to redirect the > stdout/stderr of a daemonized fastcgi Django process to a log file > (something other than /dev/null). This is very interesting for me, too. Can you post you existi