Skip to content

Commit 06fb883

Browse files
committed
Fix settings initialization for Django 1.4+ in sphinx configuration
1 parent c631228 commit 06fb883

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

doc/conf.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@
1919
# documentation root, use os.path.abspath to make it absolute, like shown here.
2020
sys.path.insert(0, os.path.abspath('..'))
2121

22-
from django.core.management import setup_environ
23-
from djangojs import settings
24-
25-
setup_environ(settings)
22+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangojs.settings')
23+
from django.conf import settings
2624

2725
# -- General configuration -----------------------------------------------------
2826

0 commit comments

Comments
 (0)