I'm attempting to learn python and can't seem to understand how python handles imports. I'm experimenting with a Flask app and i can get it to run with relative urls, but i want to use absolute urls as an exercise to learn about imports.
I've set my PYTHONPATH
to my app
directory inside my project but that doesn't seem to do anything.
Here's my setup. I've got app/__init.py
on the left and app/mod_users/controllers.py
on the right. My run.py
is a file with one line, from app import app
.
As you can see on line 17, it doesn't like the absolute import. Could this be because my app variable is named app
and so is the import path?