From 9104ae9bd014e581539f23f29aff44a576e34df4 Mon Sep 17 00:00:00 2001 From: Joey Hines Date: Fri, 13 Dec 2019 21:59:37 -0600 Subject: [PATCH] Use `settings.configure()` to create django settings for doc building + Allows docs to be built on other machines --- GeoffreyApp/docs/source/conf.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/GeoffreyApp/docs/source/conf.py b/GeoffreyApp/docs/source/conf.py index d4cf30e..5bbc0d4 100644 --- a/GeoffreyApp/docs/source/conf.py +++ b/GeoffreyApp/docs/source/conf.py @@ -12,14 +12,13 @@ # 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. # -import os -import sys import django -sys.path.insert(0, os.path.abspath('../../../../Geoffrey/')) -os.environ['DJANGO_SETTINGS_MODULE'] = 'Geoffrey.settings' +from django.conf import settings +settings.configure(INSTALLED_APPS=["GeoffreyApp"]) django.setup() + # -- Project information ----------------------------------------------------- project = 'Geoffrey'