From 9d05add447d57d94ec9e9b3daa338d85a29fe083 Mon Sep 17 00:00:00 2001 From: Markus Holtermann Date: Fri, 29 Jan 2021 15:14:21 +0100 Subject: [PATCH] Fixed #32394 -- Changed project template settings to use relative STATIC_URL. Refs #25598 which added original support for relative STATIC_URL and MEDIA_URL. --- django/conf/project_template/project_name/settings.py-tpl | 2 +- docs/releases/4.0.txt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/django/conf/project_template/project_name/settings.py-tpl b/django/conf/project_template/project_name/settings.py-tpl index 7830fb2f3c..e949752df4 100644 --- a/django/conf/project_template/project_name/settings.py-tpl +++ b/django/conf/project_template/project_name/settings.py-tpl @@ -117,7 +117,7 @@ USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/{{ docs_version }}/howto/static-files/ -STATIC_URL = '/static/' +STATIC_URL = 'static/' # Default primary key field type # https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#default-auto-field diff --git a/docs/releases/4.0.txt b/docs/releases/4.0.txt index 94782e891f..37783b906b 100644 --- a/docs/releases/4.0.txt +++ b/docs/releases/4.0.txt @@ -258,6 +258,10 @@ Miscellaneous * Support for ``cx_Oracle`` < 7.0 is removed. +* Starting with 4.0, new projects are generated with :setting:`STATIC_URL` set + to the relative path ``'static/'``. This allows for the ``SCRIPT_NAME`` to be + prepended as necessary. + .. _deprecated-features-4.0: Features deprecated in 4.0