开发者

Is the name of template folder in Django required all lower case?

I'm currently start learning Django after some python basics. When I configure my template dir like this, the app can't file the template folder and files:

TEMPLATE_DIRS = (
    "/home/hoangtu/Aptana\ Studio\ 3\ Workspace/django_bookmarks/Template",            
)

I have to rename the folder 开发者_运维技巧to lower case ("templates"), and it magically works!

TEMPLATE_DIRS = (
    "/home/hoangtu/Aptana\ Studio\ 3\ Workspace/django_bookmarks/templates",            
)

Is that true or am I missing something?

Edit: And of course, I change the folder name appropriate to the folder name in the path.


Did you also rename the folder itself, or only changed the config entry?

It shouldn't matter what the folder name is, as long as the name is consistent with the configuration. *nix systems see a difference between "templates" and "Templates", but both should work when configured properly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜