Skip to content

Commit

Permalink
Prep repo for translated docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenmcd committed Aug 3, 2014
1 parent 722c03d commit e3a9644
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
*.pyc
*.pyo
*.db
*.pot
*.doctree
.doctrees
.DS_Store
.coverage
.idea/
Expand Down
7 changes: 6 additions & 1 deletion .hgignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@ syntax: glob
*.pyc
*.pyo
*.db
*.pot
*.doctree
.doctrees
.DS_Store
.coverage
.idea
local_settings.py
build
dist
*.egg-info
*.egg
project_template/static

.project
.pydevproject
22 changes: 13 additions & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,26 @@

import sys
import os
import mezzanine


if "DJANGO_SETTINGS_MODULE" not in os.environ:
docs_path = os.path.abspath(os.path.dirname(__file__))
docs_path = os.getcwd()
parts = (docs_path, "..", "mezzanine")
sys.path.insert(0, os.path.join(*parts))
sys.path.insert(0, os.path.join(*parts + ("project_template",)))
settings_module = "mezzanine.project_template.settings"
os.environ["DJANGO_SETTINGS_MODULE"] = settings_module

import mezzanine
from mezzanine.utils import docs

docs.build_settings_docs(docs_path)
docs.build_deploy_docs(docs_path)
docs.build_changelog(docs_path)
docs.build_modelgraph(docs_path)
docs.build_requirements(docs_path)
# When a full build is run (eg from the root of the repo), we
# run all the Mezzanine utils for dynamically generated docs.
if sys.argv[-2:] == ["docs", "docs/build"]:
from mezzanine.utils import docs
docs.build_settings_docs(docs_path)
docs.build_deploy_docs(docs_path)
docs.build_changelog(docs_path)
docs.build_modelgraph(docs_path)
docs.build_requirements(docs_path)

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down Expand Up @@ -217,3 +220,4 @@

html_theme_path = ["."]
html_theme = "mezzanine_theme"
locale_dirs = ['./locale/']
Empty file added docs/locale/.placeholder
Empty file.

0 comments on commit e3a9644

Please sign in to comment.