Django: How to get the Root Path#

You may need to create or use a file in the root path of your django project. From any file included in your django project you can run:

import os

That will give


How to get the Path of the file you are in#

To get the path of the file you are currently in use:

import os