Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Cleanup destdir so old documents don't appear in the site an…

…d tarball after docu refactorings.
  • Loading branch information...
commit 08b96606e932a5ece464425d0c73c3154b5bef3f 1 parent d92c4d3
Ramiro Morales 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,

0 comments on commit 08b9660

Please sign in to comment.
Something went wrong with that request. Please try again.