Friday, March 30, 2012

Re: Template file not recognized for some strange reason

Check the file will be variable TEMPLATE_LOADERS.
It should have a setup like this:

TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
)


imarcelolz


2012/3/30 Sandro Dutra <hexodin@gmail.com>
Try something like this:

import os
abspath = lambda *p: os.path.abspath(os.path.join(*p))
PROJECT_ROOT = abspath(os.path.dirname(__file__))
[...]
TEMPLATE_DIRS = (abspath(PROJECT_ROOT, "templates"),)


2012/3/30 Tom Evans <tevans.uk@googlemail.com>
2012/3/30 Juan Pablo Martínez <jpma55@gmail.com>:
> Try
> TEMPLATE_DIRS = ("C:/Users/Documents/Music\ App/redlab/
> templates",)
>

Unlikely to work on OS X.

Cheers

Tom

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.


--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment