I am working to move a Django project from windows to linux. It works great in windows, but I am running into all sorts of errors trying to get it running on linux. The current issue I am facing is saying the template cannot be found. I have tried all the recommendations I can find online so I am looking for a little help. Furthermore, I am a little confused because one of the directories it says it is looking in which has the actual file, Django still does not see it.
Here is part of the error in the picture showing which directory it looked at to find the file. The file is actually in this directory, so I am not sure what is going on. One thing I noticed is the back slash is incorrect, not sure where this directory is located in the code to fix this?
django.template.loaders.filesystem.Loader: /home/pi/Desktop/MarketJungle/project_settings/templates/Website\base_template.html (Source does not exist)
The issue is with the direction of the slashes. As you've seen it's in the path the error shows;
/home/pi/Desktop/MarketJungle/project_settings/templates/Website\base_template.html (Source does not exist)
In that path you've got the /
of the linux file system then the \
you use in your template with {% extends "Website\base_template.html" %}
You should use /
by default, because it works for both Windows and Linux, whereas the \
only works for Windows. This is convenient if you are developing in one environment and deploying in the other; you can keep the same code for both.