Skip to content

Commit cc49b0b

Browse files
authored
Update the STATIC_ROOT for Django 3.1
1 parent f67cdf3 commit cc49b0b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/django.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ with a new Django project then you'll need add the following to the bottom of yo
1919
``settings.py`` file:
2020

2121
.. code-block:: python
22-
23-
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
22+
23+
STATIC_ROOT = BASE_DIR / 'staticfiles'
2424
2525
As part of deploying your application you'll need to run ``./manage.py collectstatic`` to
2626
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``:
701701
.. code-block:: python
702702
703703
STATICFILES_DIRS = [
704-
os.path.join(BASE_DIR, 'static_build')
704+
BASE_DIR / 'static_build'
705705
]
706706
707707
This means that Django can find the processed files, but doesn't need to know anything

0 commit comments

Comments
 (0)