import os from yourproject.settings import BASE_DIR file_path = os.path.join(BASE_DIR, 'relative_path')