- Django 3 Web Development Cookbook
- Aidas Bendoraitis Jake Kronika
- 88字
- 2025-04-04 13:15:07
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.