Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Really actually revert what I tried to revert previously.

Thanks for making me look like an idiot, Git.
  • Loading branch information...
commit 45632fc305a9085a291f368ae75575d5d86aa2a7 1 parent 5d4f3a9
@jacobian jacobian authored
View
2  deploy-requirements.txt
@@ -11,7 +11,7 @@ FeedParser >= 5.0, <= 5.1
Jinja2 >= 2.4, < 2.5
psycopg2 >= 2.2, < 2.3
python-memcached >= 1.45, < 2.0
-Sphinx == 1.0.3
+Sphinx >= 1.0, < 1.1
South >= 0.7, < 0.8
Unipath >= 0.2, < 0.3
raven == 1.4.6
View
26 django_website/docs/management/commands/update_docs.py
@@ -4,7 +4,6 @@
"""
from __future__ import absolute_import
-import os
import json
import haystack
import optparse
@@ -54,11 +53,6 @@ def handle_noargs(self, **kwargs):
#
# Use Sphinx to build the release docs into JSON and HTML documents.
#
- if release.docs_subdir:
- source_dir = destdir.child(*release.docs_subdir.split('/'))
- else:
- source_dir = destdir
-
for builder in ('json', 'html'):
# Make the directory for the built files - sphinx-build doesn't
# do it for us, apparently.
@@ -68,11 +62,11 @@ def handle_noargs(self, **kwargs):
# "Shell out" (not exactly, but basically) to sphinx-build.
if verbosity >= 2:
- print " building %s (%s -> %s)" % (builder, source_dir, build_dir)
+ print " building %s (into %s)" % (builder, build_dir)
sphinx.cmdline.main(['sphinx-build',
'-b', builder,
'-q', # Be vewy qwiet
- source_dir, # Source file directory
+ destdir, # Source file directory
build_dir, # Destination directory
])
@@ -156,19 +150,3 @@ def zipfile_inclusion_filter(f):
def update_svn(self, url, destdir):
subprocess.call(['svn', 'checkout', '-q', url, destdir])
-
- def update_git(self, url, destdir):
- if '@' in url:
- repo, branch = url.rsplit('@', 1)
- else:
- repo, branch = url, 'master'
- if destdir.child('.git').exists():
- try:
- cwd = os.getcwdu()
- os.chdir(destdir)
- subprocess.call(['git', 'fetch'])
- subprocess.call(['git', 'reset', '--hard', branch])
- finally:
- os.chdir(cwd)
- else:
- subprocess.call(['git', 'clone', '-q', '--branch', branch, repo, destdir])
View
17 django_website/docs/models.py
@@ -12,28 +12,25 @@ class DocumentRelease(models.Model):
"""
DEFAULT_CACHE_KEY = "%s_recent_release" % settings.CACHE_MIDDLEWARE_KEY_PREFIX
SVN = 'svn'
- GIT = 'git'
SCM_CHOICES = (
(SVN, 'SVN'),
- (GIT, 'git'),
)
-
+
lang = models.CharField(max_length=2, choices=settings.LANGUAGES, default='en')
version = models.CharField(max_length=20)
scm = models.CharField(max_length=10, choices=SCM_CHOICES)
- scm_url = models.CharField(max_length=200)
- docs_subdir = models.CharField(max_length=200, blank=True)
+ scm_url = models.URLField()
is_default = models.BooleanField()
-
+
objects = DocumentReleaseManager()
-
+
def __unicode__(self):
return "%s/%s" % (self.lang, self.version)
-
+
@models.permalink
def get_absolute_url(self):
return ('document-index', [], {'lang': self.lang, 'version': self.version})
-
+
def save(self, *args, **kwargs):
# There can be only one. Default, that is.
if self.is_default:
@@ -44,7 +41,7 @@ def save(self, *args, **kwargs):
settings.CACHE_MIDDLEWARE_SECONDS,
)
super(DocumentRelease, self).save(*args, **kwargs)
-
+
@property
def human_version(self):
"""
View
2  fabfile.py
@@ -72,7 +72,7 @@ def update_docs():
"""
Force an update of the docs on the server.
"""
- managepy('update_docs -v2', site='docs')
+ managepy('update_docs', site='docs')
def copy_db():
"""
Please sign in to comment.
Something went wrong with that request. Please try again.