I am writing a unit test that needs to access an image file that I put in \"fixtures\" directory right under my django app directory. I want to open up this image file in my tes
Normally, this is what I add in my settings.py file so I can reference the project root.
import os.path PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
This method will get the directory of any python file.