0
votes

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).

1
can you show us where and how is your SECRET_KEY defined in your settings.py file? - Mihai Zamfir
It's just in project/settings.py file: SECRET_KEY = 'q_VERY_SECRET_c'. Nothing tricky here, and as I mentioned before, application works fine, just make html for Sphinx is not working. - GwynBleidD

1 Answers

0
votes

Strange...

Problem disappears when I changed value of secret key.