I've look over the other SO questions related to this but none have helped.
I just installed an app and added to the INSTALLED_APPS variable in settings. The app django_messages, extends a base.html template from each of its templates.
For some reason django isnt recursively searching the app directory for this template.
Here is the error: In template /Library/Python/2.7/site-packages/django_messages/templates/django_messages/inbox.html, error at line 1
{% extends "django_messages/base.html" %}
That file is located at: /Library/Python/2.7/site-packages/django_messages/templates/django_messages/base.html
but the search path django is giving is:
Django tried loading these templates, in this order:
Using engine django:
django.template.loaders.app_directories.Loader: /Library/Python/2.7/site-packages/django_messages/templates/base.html (Source does not exist)
So based on what I understand about the template loader it makes sense it should be searching /Library/Python/2.7/site-packages/django_messages/templates/ for the file. But the file is called "django_messages/base.html" so I don't understand why django is looking for base.html in django_messages/templates and ignoring the django_messages qualifier.
All my other templates (in my own apps) are set up this way app_name/templates/app_name/xxx.html as indicated in the django docs. So everything looks correct but is not working.
Any help appreciated tired of banging my head on this.
Thanks.
So I found out why this was happening...
The file django_messages/base.html was attempting to extend "base.html". I assume the reason for this is it is meant to extend your own base.html file, however my base.html file is located under app_name/base.html.
Once I changed the path in django_messages/base.html I never got any errors. Hopefully this helps someone else. It was confusing because it said the error was extending "django_messages/base.html" from the file django_messages/inbox.html and those paths are both correct, so it seems like it was evaluating the extends on django_messages/base.html and could not find this file but adding the traceback to inbox.html instead of django_messages/base.html which I would have expected. Anyway, all is good now.