From cc49b0b9a9489b5b7466bbc8878bd157c5b749a9 Mon Sep 17 00:00:00 2001 From: Ali <40032682+AliRn76@users.noreply.github.com> Date: Sun, 13 Dec 2020 18:04:00 +0330 Subject: [PATCH] Update the STATIC_ROOT for Django 3.1 --- docs/django.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/django.rst b/docs/django.rst index 4e231982..f6b9b000 100644 --- a/docs/django.rst +++ b/docs/django.rst @@ -19,8 +19,8 @@ with a new Django project then you'll need add the following to the bottom of yo ``settings.py`` file: .. code-block:: python - - STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') + + STATIC_ROOT = BASE_DIR / 'staticfiles' As part of deploying your application you'll need to run ``./manage.py collectstatic`` to put all your static files into ``STATIC_ROOT``. (If you're running on Heroku then @@ -701,7 +701,7 @@ The path to the ``static_build`` directory is added to ``settings.py``: .. code-block:: python STATICFILES_DIRS = [ - os.path.join(BASE_DIR, 'static_build') + BASE_DIR / 'static_build' ] This means that Django can find the processed files, but doesn't need to know anything