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
> windows, the path returned would be of backslashes "\" instead of "/".

The default settings.py generated by startproject tries to make this clear:

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.
)

...
> So is it possible to patch django instead of patching every single
> project?

I'm not sure what the original rationale was for TEMPLATE_DIRS having
that usage rule, but I can say that it avoids the need to
double-escape backslashes, which might make it *more* newbie friendly.

In any case, this would be a backwards-incompatible change, and it's
not just Django that would need to be patched in order to make it.

Consider raising this issue on django-developers if you'd like to
persue the discussion of the setting change-- this list is mostly used
for helping users rather than changing Django.

> P.S. It is freaky to hear that django intend to read files from
> absolute paths instead of using relative paths.

I'm not sure why that is.   Templates are often developed and deployed
separately than the rest of Django code.

Cheers,
  Jeremy

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to