I am new to python.
I want to access a file using path.
My Directory looks like this
main_folder
├───backend
│ └───src
│ ├───apps
│ │ └───frontendreact/views.py
├───frontend
│ └───src
│ └───templates
│ ├───index.html
I have witten in code.
def index(request):
import os
print('\n')
print(os.getcwd()) # This print -->> D:\main_folder\backend\src
print('\n')
return render(request, '../../frontend/templates/frontend/index.html')
Above code is giving me error - TemplateDoesNotExist at /
But I want to access the file which is in main_folder/frontend/templates/index.html.
But my python file from where i am calling path is in main_folder/backend/src/apps/frontendreact/views.py.html