简体   繁体   中英

Django: Difference between BASE_DIR and PROJECT_ROOT?

From settings.py:

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))

What's the difference between these two?

They're almost the same thing. BASE_DIR is where your manage.py lies, and PROJECT_ROOT is BASE_DIR + your_project_name (where settings.py is).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM