Forums

django.template.exceptions.TemplateDoesNotExist: asset/products/product-history.html

Good Day!

Can you please help me with this error? On my local, it's working properly. But upon clicking in this URL it says this error:

2022-09-17 23:09:29,598: Internal Server Error: /asset/product-history/126/
Traceback (most recent call last):
  File "/home/lazyguzty/.virtualenvs/squid-virtualenv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/home/lazyguzty/.virtualenvs/squid-virtualenv/lib/python3.6/site-packages/django/core/handlers/base.py", line 217, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/lazyguzty/.virtualenvs/squid-virtualenv/lib/python3.6/site-packages/django/core/handlers/base.py", line 215, in _get_response
    response = response.render()
  File "/home/lazyguzty/.virtualenvs/squid-virtualenv/lib/python3.6/site-packages/django/template/response.py", line 107, in render
    self.content = self.rendered_content
  File "/home/lazyguzty/.virtualenvs/squid-virtualenv/lib/python3.6/site-packages/django/template/response.py", line 82, in rendered_content
    template = self.resolve_template(self.template_name)
  File "/home/lazyguzty/.virtualenvs/squid-virtualenv/lib/python3.6/site-packages/django/template/response.py", line 64, in resolve_template
    return select_template(template, using=self.using)
  File "/home/lazyguzty/.virtualenvs/squid-virtualenv/lib/python3.6/site-packages/django/template/loader.py", line 53, in select_template
    raise TemplateDoesNotExist(', '.join(template_name_list), chain=chain)
django.template.exceptions.TemplateDoesNotExist: asset/products/product-history.html

It might be an issue with static files mappings. Also, make sure that your TEMPLATES setting has correct paths.

Oh, wait. Tried to configure my static files mappings. But it seems that its really working on my other server. I just don't know why on your server is just causing the problem.

It may be related to the fact that we have additional settings for static files mappings, have a look at this help page as well.