1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #29983 -- Replaced os.path() with pathlib.Path in project template and docs.

Thanks Curtis Maloney for the original patch.
This commit is contained in:
Jon Dufresne
2019-11-07 02:11:27 -08:00
committed by Carlton Gibson
parent 77aa74cb70
commit 26554cf5d1
8 changed files with 24 additions and 24 deletions

View File

@@ -34,8 +34,8 @@ settings:
* :setting:`NAME` -- The name of your database. If you're using SQLite, the
database will be a file on your computer; in that case, :setting:`NAME`
should be the full absolute path, including filename, of that file. The
default value, ``os.path.join(BASE_DIR, 'db.sqlite3')``, will store the file
in your project directory.
default value, ``BASE_DIR / 'db.sqlite3'``, will store the file in your
project directory.
If you are not using SQLite as your database, additional settings such as
:setting:`USER`, :setting:`PASSWORD`, and :setting:`HOST` must be added.

View File

@@ -306,7 +306,7 @@ Open your settings file (:file:`mysite/settings.py`, remember) and add a
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates')],
'DIRS': [BASE_DIR / 'templates'],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [