On 5/26/07, itsnotvalid <[EMAIL PROTECTED]> wrote:
> I can't imagine if there is a need to fix
> that path on every machine if a given project (like a blog engine) be
> distributed to different server located in different path.
I'd change the settings file in that case. :)
--~--~-~--~--
Actually in the meantime i figured out that using
os.path.abspath('templates') would do the job, elegant as it should
be. And it is platform independent.
For the P.S. bit, I got the idea from djangoproject.com's SVN where
they have templates and the rest put together in the same branch. I
thought
On 5/26/07, itsnotvalid <[EMAIL PROTECTED]> wrote:
...
> As usual, it doesn't work, and in the comments section somebody
> suggested using os.path.dirname(__file__) instead.
Hmm. If you have other complaints about docs, please point out places
that need improvement.
> However I am using
> windo
I am a new user of Django (as well as Python) that finding the tricks
on TEMPLATE_DIRS very frustrating.
Here is the method of using relative path as written in Django Book:
import os.path
TEMPLATE_DIRS = (
os.path.join(os.path.basename(__file__), 'templates'),
)
As usual, it doesn't work,
4 matches
Mail list logo