浏览代码

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 年之前
父节点
当前提交
caf5cd7ba7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      django/conf/project_template/project_name/settings.py

+ 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