Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixes to doc generation.

  • Loading branch information...
commit c4337eabc02f823761fe3b77816f44e268c05218 1 parent 282ff5b
@jacobian jacobian authored
View
5 django_website/docs/management/commands/update_docs.py
@@ -5,6 +5,7 @@
from __future__ import absolute_import
import subprocess
+import sphinx.cmdline
from django.conf import settings
from django.core.management.base import NoArgsCommand
from unipath import FSPath as Path
@@ -28,8 +29,8 @@ def handle_noargs(self, **kwargs):
if not json_build_dir.exists():
json_build_dir.mkdir(parents=True)
- # Shell out to sphinx-build.
- subprocess.call(['sphinx-build',
+ # "Shell out" (not exactly, but basically) to sphinx-build.
+ sphinx.cmdline.main(['sphinx-build',
'-b', 'json', # Use the JSON builder
'-q', # Be vewy qwiet
destdir, # Source file directory
View
16 fabfile.py
@@ -68,8 +68,8 @@ def reset_community():
This is a temporary command that does some damage and it should be removed
once the new server's up.
"""
- _managepy('reset aggregator --noinput')
- _managepy('loaddata community_seed')
+ managepy('reset aggregator --noinput')
+ managepy('loaddata community_seed')
def reset_docs():
"""
@@ -78,8 +78,14 @@ def reset_docs():
This is a temporary command that does some damage and it should be removed
once the new server's up.
"""
- _managepy('reset docs --noinput')
- _managepy('loaddata doc_releases')
+ managepy('reset docs --noinput')
+ managepy('loaddata doc_releases')
+
+def update_docs():
+ """
+ Force an update of the docs on the server.
+ """
+ managepy('update_docs', site='docs')
def copy_db():
"""
@@ -87,7 +93,7 @@ def copy_db():
"""
local('ssh %s pg_dump -U djangoproject -c djangoproject | psql djangoproject' % env.hosts[0])
-def _managepy(cmd, site='www'):
+def managepy(cmd, site='www'):
"""
Helper: run a management command remotely.
"""
Please sign in to comment.
Something went wrong with that request. Please try again.