mirror of https://github.com/django/django.git
Simplified settings' BASE_DIR definition with pathlib.Path.parent.
This commit is contained in:
parent
6929f13254
commit
ba4389a36b
|
@ -13,7 +13,7 @@ https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/
|
|||
from pathlib import Path
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve(strict=True).parents[1]
|
||||
BASE_DIR = Path(__file__).resolve(strict=True).parent.parent
|
||||
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
|
|
Loading…
Reference in New Issue