From bf265f071e2319c37040b9373e5a3cfa524a20e9 Mon Sep 17 00:00:00 2001 From: Keshav Priyadarshi Date: Thu, 26 Sep 2024 23:27:37 +0530 Subject: [PATCH] Add Django app directory to sys.path for autodoc Signed-off-by: Keshav Priyadarshi --- docs/source/conf.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/source/conf.py b/docs/source/conf.py index de086fe..163a9ca 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -11,8 +11,11 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. import os +import sys os.environ.setdefault("DJANGO_SETTINGS_MODULE", "federatedcode.settings") +os.environ.setdefault("SECRET_KEY", "dummy secret key for autodoc rtd documentation") +sys.path.insert(0, os.path.abspath("../../.")) # -- Project information -----------------------------------------------------