Use `settings.configure()` to create django settings for doc building

+ Allows docs to be built on other machines
doc_update
Joey Hines 2019-12-13 21:59:37 -06:00
parent cbd7c02117
commit 9104ae9bd0
1 changed files with 3 additions and 4 deletions

View File

@ -12,14 +12,13 @@
# add these directories to sys.path here. If the directory is relative to the # add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here. # documentation root, use os.path.abspath to make it absolute, like shown here.
# #
import os
import sys
import django import django
sys.path.insert(0, os.path.abspath('../../../../Geoffrey/')) from django.conf import settings
os.environ['DJANGO_SETTINGS_MODULE'] = 'Geoffrey.settings' settings.configure(INSTALLED_APPS=["GeoffreyApp"])
django.setup() django.setup()
# -- Project information ----------------------------------------------------- # -- Project information -----------------------------------------------------
project = 'Geoffrey' project = 'Geoffrey'