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.dirname
(__file__)), *x)

I can configure TEMPLATE_DIRS or MEDIA_ROOT like this :

::

    MEDIA_ROOT = ''


    TEMPLATE_DIRS = (
        # Put strings here, like "/home/html/django_templates" or "C:/
www/django/templates".
        # Always use forward slashes, even on Windows.
        # Don't forget to use absolute paths, not relative paths.
        here('myapp/templates'),
        here_cross(('otherapp', 'templates')),
    )

I suppose that this comment "Don't forget to use absolute paths, not
relative paths" is
relevant if I don't use "here" or "here_cross" function. If I don't
use it,
template paths are relative to current working directory and not to
"settings.py" file.

What do you think about this method (using here) ?
Why don't put "here" or/and "here_cross" in Django settings.py
skeleton ?

Note, I found here and here_cross tip on this page :
http://www.djangosnippets.org/snippets/445/

Thanks for your comment.
Regards,
Stephane
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to