Forums

How do you setup template directory for application?

Hi,

How do you setup a template directory? I am trying to setup an application, Haystack, and the documentation instructs me to create a search template: search/search.html.

How do I change the settings.py file to establish the template directory and/or where do I place this search directory in my project files on pythonanywhere? I am getting a TemplateDoesNotExist, which I assume is because the Haystack app doesn't know where to find this template.

Thank you.

If it helps, the doc that says to create search/search.html is at http://django-haystack.readthedocs.io/en/v2.5.0/tutorial.html

Haystack found search.html in app_name/templates/search/search.html. Problem solved, thank you.

Excellent, glad you worked it out!

Thank you @giles! I appreciate your trying to help on the last couple topics I've posted.

i host my django project on pythonanywhere.com but templates does not work . what can i do? please help...

We need more details to help you. What errors do you get? How does your code look like?