Re: What do you think about here lambda function to configure TEMPLATE_DIRS with relatives values ?

2009-06-30 Thread Darryl Ross
Hi Stephane, I think it is a great idea. The lambda trick means I don't have to make any changes at all to switch between my development environment and production. A real life example from a current project: - from os.path import abspath, dirname, join APP_PATH = lambda *x: abspath(join(dir

Re: What do you think about here lambda function to configure TEMPLATE_DIRS with relatives values ?

2009-06-30 Thread Michael
On Tue, Jun 30, 2009 at 7:54 AM, KLEIN Stéphane wrote: > > Sorry, I've some break line issue in my previous post. > This is my post cleaned. > > Hi, > > When I configuration my TEMPLATE_DIRS in settings.py file, I use ever > "here" or "here_cross" lambda function defined like this : > > :: > >

Re: What do you think about here lambda function to configure TEMPLATE_DIRS with relatives values ?

2009-06-30 Thread KLEIN Stéphane
Sorry, I've some break line issue in my previous post. This is my post cleaned. Hi, When I configuration my TEMPLATE_DIRS in settings.py file, I use ever "here" or "here_cross" lambda function defined like this : :: import os here = lambda x: os.path.join(os.path.abspath(os.path.dirnam

What do you think about here lambda function to configure TEMPLATE_DIRS with relatives values ?

2009-06-30 Thread klein.steph...@gmail.com
Hi, When I configuration my TEMPLATE_DIRS in settings.py file, I use ever "here" or "here_cross" lambda function defined like this : :: import os here = lambda x: os.path.join(os.path.abspath(os.path.dirname (__file__)), x) here_cross = lambda x: os.path.join(os.path.abspath(os.path