2
0
Эх сурвалжийг харах

Fixed #23436 -- Made BASE_DIR absolute in settings template.

This ensures consistency between Python 3.4+ and earlier versions.

Thanks Harry Percival for the report.
Aymeric Augustin 10 жил өмнө
parent
commit
caf5cd7ba7

+ 1 - 1
django/conf/project_template/project_name/settings.py

@@ -10,7 +10,7 @@ https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/
 
 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
 import os
-BASE_DIR = os.path.dirname(os.path.dirname(__file__))
+BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
 
 
 # Quick-start development settings - unsuitable for production