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
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 :
>
> ::
>
>
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
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
4 matches
Mail list logo