Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #24 from ramiro/08b96606e932a5ece464425d0c73c3154b…


Clean docs destdir before Spginx renders them
  • Loading branch information...
commit cf97bf2c2c0e3f3110e78d9e6e35700e83c478ce 2 parents bdb353c + 08b9660
Jacob Kaplan-Moss jacobian authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 django_website/docs/management/commands/
6 django_website/docs/management/commands/
@@ -54,9 +54,11 @@ def handle_noargs(self, **kwargs):
# Use Sphinx to build the release docs into JSON and HTML documents.
for builder in ('json', 'html'):
+ build_dir = destdir.child('_build', builder)
+ # Remove old renderized versions of the docs
+ build_dir.rmtree(parents=False)
# Make the directory for the built files - sphinx-build doesn't
# do it for us, apparently.
- build_dir = destdir.child('_build', builder)
if not build_dir.exists():
@@ -102,7 +104,7 @@ def handle_noargs(self, **kwargs):
# Walk the tree we've just built looking for ".fjson" documents
# (just JSON, but Sphinx names them weirdly). Each one of those
# documents gets a corresponding Document object created which
- # we'll then ask Sphinx to reindex.
+ # we'll then ask Haystack to reindex.
# We have to be a bit careful to reverse-engineer the correct
# relative path component, especially for "index" documents,
Please sign in to comment.
Something went wrong with that request. Please try again.