Skip to content

Commit

Permalink
Added settings and requirements to support readthedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Meyer committed Mar 25, 2016
1 parent b04b377 commit 32ab407
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
6 changes: 5 additions & 1 deletion scale/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@

# Set up Django for autodoc generation
import django
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "scale.local_settings")
settings_default="scale.local_settings"
# If we readthedocs is building, swap in local_settings_DOCS as default
if os.environ.get('READTHEDOCS', None) == 'True':
settings_default="scale.local_settings_DOCS"
os.environ.setdefault("DJANGO_SETTINGS_MODULE", settings_default)
django.setup()

# -- General configuration -----------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion scale/pip/build_linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ flake8>=2.1.0,<2.2.0
mock>=1.0.0,<1.1.0
nose>=1.3.0,<1.4.0
pylint>=1.1.0,<1.2.0
Sphinx>=1.1.0,<1.2.0
Sphinx>=1.2.0,<1.3.0
8 changes: 8 additions & 0 deletions scale/scale/local_settings_DOCS.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#@PydevCodeAnalysisIgnore

# Settings file for use with readthedocs sphinx generation

# Include all the default settings.
from settings import *

SECRET_KEY='15tryuv4t3hugbv7890aQ'

0 comments on commit 32ab407

Please sign in to comment.