On Nov 14, 1:28 pm, Brian <martinair.ameri...@gmail.com> wrote: > Thanks for the help, Still can not get it to work. > > I changed TEMPLATE_DIRS setting 30 ways. > > I can't seem to move down the dir tree for inserting of html files > using {% include "file" %} statement, Works just fine to any where up > the tree, i can go up 3,4 levels just fine, but can not go down even 1 > {% include "../LOGO.html" %} > > Sample dir structure: > > root/lib/LOGO.html (1 level down then 1 level up, not working ) > root/LOGO.html (1 level down, not working) > root/main/home.html <--tried: {% include "../LOGO.html" %} ,{% include > "root/lib/LOGO.html" %} , {% include "/root/lib/logo.html" %} > root/main/start.py > root/main/LOGO.html (works fine) > root/main/include/LOGO.html (works fine) > > To test I put just directory text inside the html file so I know what > is displaying
You do not seem to have taken my or Shawn's advice at all. What does your TEMPLATE_DIRS setting look like now? As I said above, you can't reference templates that don't fall under a directory within that setting. Additionally, there are no relative paths when referencing from one template to another. You always need to reference the full path from the base template dir to the actual template path. So, assuming your TEMPLATE_DIRS setting is: TEMPLATE_DIRS = ( 'root', ) you render your 'home.html' as 'main/home.html'. Then you can do {% include "lib/logo.html" %}. -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.