This is my first time reaching out over the internet, so please forgive me if I violate any formalities. Thanks in advance to anyone taking their time to help me!
I am running my program with Django 4.2.1 and Python 3.11.3. I am using Visual Studio Code on a MacBook.
My program was running fine, until I attempted to create a template html file and use another html file to extend it. I keep getting the TemplateDoesNotExist error, and I am now at a lost as to why. I know it is probably something simple that I am overlooking. I am trying to learn Django, and am hitting a road block here.
The full project can be viewed here:
https://github.com/NoahSyler/LearningDjango/tree/main
The copied path to the file from finder → /Users/noahsyler/Documents/Comp Sci/monthly_challenges/templates/base.html
The path from the error page → “/Users/noahsyler/Documents/Comp Sci/monthly_challenges/templates/base.html (Source does not exist)”
- In settings.py, `APP_DIRS = True`
- I have tried `BASE_DIR / "templates"` In DIRS
- I have tried `os.path.join(BASE_DIR,'templates')` in DIRS
- templates is in the root of the app, the same folder as manage.py
- As far as I can tell, everything is spelled correctly. I copied and pasted the names from the error message into the folder & file names to make sure everything is consistent
- The error message says "monthly_challenges/templates/base.html (Source does not exist)," but this is the correct path
- I have looked at other posts and asked chatGPT, but I cannot tell what I am doing wrong.
-To make sure it is not an issue with the file permissions, I set the permissions of the file to rwx.