소스 검색

Fixed #32394 -- Changed project template settings to use relative STATIC_URL.

Refs #25598 which added original support for relative STATIC_URL and
MEDIA_URL.
Markus Holtermann 4 년 전
부모
커밋
9d05add447
2개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      django/conf/project_template/project_name/settings.py-tpl
  2. 4 0
      docs/releases/4.0.txt

+ 1 - 1
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

+ 4 - 0
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