0

I have deployed my django app in python anywhere and getting below error :

TemplateDoesNotExist at /topic/
cms_app\content.html

I have two apps in my project. One is cms_app and other is users.

My templates location is Content_Mgmnt/cms_app/templates
/cms_app/content.html

For users and other cms_app templates are working fine however for /topic/ url this is not working and showing templates does not exists.

The same code is working fine in development environment however giving issues in production. How to solve this error?

4
  • Is Content_Mgmnt the name of your project? Commented Mar 17 at 18:54
  • Also include the complete error message and show us the content of content.html Commented Mar 17 at 18:54
  • Sure I will do that from next time. I have resolved this issue. Changing the slash from cms_app\content.html to cms_app/content.html resolved the issue. Commented Mar 18 at 2:59
  • 1
    @Mithel could you edit the OP with some clarification that the issue was related to a typo and mark it as resolved? Commented Mar 18 at 9:20

1 Answer 1

0

I was getting this error for template does not exists which I resolved.

Error during template rendering

In template /home/Django_Content_Mgmnt_App/cms_app/templates/cms_app/topic_list.html, error at line 1

cms_app\content.html

{% extends 'cms_app\content.html' %}

I checked the template where error occurred from the files tab in Python Anywhere and compared this with other templates which were working fine to find the issue. It was a typo error, so I have changed this code from {% extends 'cms_app\content.html' %} to {% extends 'cms_app/content.html' %}. And reloaded my code and it's now working.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.