Django 3 Web Development Cookbook
上QQ阅读APP看书,第一时间看更新

How it works...

By default, Django settings include a BASE_DIR value, which is an absolute path to the directory containing manage.py (usually one level higher than the settings.py file or two levels higher than settings/_base.py). Then, we set all of the paths relative to BASE_DIR using the os.path.join() function.

Based on the directory layout we set down in the Creating a project file structure recipe, we would insert 'myproject' as an intermediary path segment for some of the previous examples since the associated folders were created within this.