I'm using django 1.5.8 and Sphinx 1.2.2 with autodoc enabled. I've added some code to conf.py:
import sys
import os
sys.path.append(os.path.abspath(os.path.dirname(os.path.dirname(__file__))))
print sys.path
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")
from django.conf import settings
but when I'm trying to make documentation, autodoc fails on each file that imports django.db.models with error:
ImproperlyConfigured: The SECRET_KEY setting must not be empty.
SECRET_KEY is defined on my settings.py file (without that my app wouldn't run at all and also sphinx will fail on processing conf.py file).
SECRET_KEYdefined in yoursettings.pyfile? - Mihai Zamfirproject/settings.pyfile:SECRET_KEY = 'q_VERY_SECRET_c'. Nothing tricky here, and as I mentioned before, application works fine, justmake htmlfor Sphinx is not working. - GwynBleidD