0

Hi I had followed project organisation in directory ./my_project/

-venv/
-static/
-templates/
--index.html
--login.html
-requirements.txt
-main.py
-views.py

then i wanted to add test folder and reorganise all to following structure:

-venv/
-my_project/
--static/
--templates/
---index.html
---login.html
--requirements.txt
--main.py
--views.py

And when I am running main file, server runs, but if I open on a browser right address there is error 404. In log of a server I see that server recieves request, but something is wrong. I have no idea what is this, because I didn't change anything in code.

1 Answers1

0

You need to make the my_project a Python package by adding an empty __init__.py file inside it.

See this answer here https://stackoverflow.com/a/448279/9379795

ibutiti
  • 26
  • 1
  • 3