Просмотр исходного кода

Configure settings for docs using test function (not sandbox)

This avoids a pesky autodoc import issue that the debug toolbar creates when it
patches the URL conf.  It was preventing the EventHandler class from
being loaded via autodoc.  This fix solves that issue.
master
David Winterbottom 12 лет назад
Родитель
Сommit
ac7e8ee272
1 измененных файлов: 3 добавлений и 5 удалений
  1. 3
    5
      docs/source/conf.py

+ 3
- 5
docs/source/conf.py Просмотреть файл

@@ -21,13 +21,11 @@ import sys
21 21
 import os
22 22
 oscar_folder = os.path.realpath(
23 23
     os.path.join(os.path.dirname(__file__), '../..'))
24
-sandbox_folder = os.path.realpath(
25
-    os.path.join(os.path.dirname(__file__), '../../sites/sandbox'))
26 24
 sys.path.append(oscar_folder)
27
-sys.path.append(sandbox_folder)
28 25
 
29
-# Specify settings module
30
-os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'settings')
26
+# Specify settings module (which will be picked up from the sandbox)
27
+from tests.config import configure
28
+configure()
31 29
 
32 30
 # -- General configuration -----------------------------------------------------
33 31
 

Загрузка…
Отмена
Сохранить