Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Jacob Kaplan-Moss authored May 04, 2012
2  deploy-requirements.txt
@@ -11,7 +11,7 @@ FeedParser >= 5.0, <= 5.1
11 11
 Jinja2 >= 2.4, < 2.5
12 12
 psycopg2 >= 2.2, < 2.3
13 13
 python-memcached >= 1.45, < 2.0
14  
-Sphinx == 1.0.3
  14
+Sphinx >= 1.0, < 1.1
15 15
 South >= 0.7, < 0.8
16 16
 Unipath >= 0.2, < 0.3
17 17
 raven == 1.4.6
26  django_website/docs/management/commands/update_docs.py
@@ -4,7 +4,6 @@
4 4
 """
5 5
 from __future__ import absolute_import
6 6
 
7  
-import os
8 7
 import json
9 8
 import haystack
10 9
 import optparse
@@ -54,11 +53,6 @@ def handle_noargs(self, **kwargs):
54 53
             #
55 54
             # Use Sphinx to build the release docs into JSON and HTML documents.
56 55
             #
57  
-            if release.docs_subdir:
58  
-                source_dir = destdir.child(*release.docs_subdir.split('/'))
59  
-            else:
60  
-                source_dir = destdir
61  
-
62 56
             for builder in ('json', 'html'):
63 57
                 # Make the directory for the built files - sphinx-build doesn't
64 58
                 # do it for us, apparently.
@@ -68,11 +62,11 @@ def handle_noargs(self, **kwargs):
68 62
 
69 63
                 # "Shell out" (not exactly, but basically) to sphinx-build.
70 64
                 if verbosity >= 2:
71  
-                    print "  building %s (%s -> %s)" % (builder, source_dir, build_dir)
  65
+                    print "  building %s (into %s)" % (builder, build_dir)
72 66
                 sphinx.cmdline.main(['sphinx-build',
73 67
                     '-b', builder,
74 68
                     '-q',              # Be vewy qwiet
75  
-                    source_dir,        # Source file directory
  69
+                    destdir,           # Source file directory
76 70
                     build_dir,         # Destination directory
77 71
                 ])
78 72
 
@@ -156,19 +150,3 @@ def zipfile_inclusion_filter(f):
156 150
 
157 151
     def update_svn(self, url, destdir):
158 152
         subprocess.call(['svn', 'checkout', '-q', url, destdir])
159  
-
160  
-    def update_git(self, url, destdir):
161  
-        if '@' in url:
162  
-            repo, branch = url.rsplit('@', 1)
163  
-        else:
164  
-            repo, branch = url, 'master'
165  
-        if destdir.child('.git').exists():
166  
-            try:
167  
-                cwd = os.getcwdu()
168  
-                os.chdir(destdir)
169  
-                subprocess.call(['git', 'fetch'])
170  
-                subprocess.call(['git', 'reset', '--hard', branch])
171  
-            finally:
172  
-                os.chdir(cwd)
173  
-        else:
174  
-            subprocess.call(['git', 'clone', '-q', '--branch', branch, repo, destdir])
17  django_website/docs/models.py
@@ -12,28 +12,25 @@ class DocumentRelease(models.Model):
12 12
     """
13 13
     DEFAULT_CACHE_KEY = "%s_recent_release" % settings.CACHE_MIDDLEWARE_KEY_PREFIX
14 14
     SVN = 'svn'
15  
-    GIT = 'git'
16 15
     SCM_CHOICES = (
17 16
         (SVN, 'SVN'),
18  
-        (GIT, 'git'),
19 17
     )
20  
-
  18
+    
21 19
     lang = models.CharField(max_length=2, choices=settings.LANGUAGES, default='en')
22 20
     version = models.CharField(max_length=20)
23 21
     scm = models.CharField(max_length=10, choices=SCM_CHOICES)
24  
-    scm_url = models.CharField(max_length=200)
25  
-    docs_subdir = models.CharField(max_length=200, blank=True)
  22
+    scm_url = models.URLField()
26 23
     is_default = models.BooleanField()
27  
-
  24
+    
28 25
     objects = DocumentReleaseManager()
29  
-
  26
+    
30 27
     def __unicode__(self):
31 28
         return "%s/%s" % (self.lang, self.version)
32  
-
  29
+    
33 30
     @models.permalink
34 31
     def get_absolute_url(self):
35 32
         return ('document-index', [], {'lang': self.lang, 'version': self.version})
36  
-
  33
+            
37 34
     def save(self, *args, **kwargs):
38 35
         # There can be only one. Default, that is.
39 36
         if self.is_default:
@@ -44,7 +41,7 @@ def save(self, *args, **kwargs):
44 41
                 settings.CACHE_MIDDLEWARE_SECONDS,
45 42
             )
46 43
         super(DocumentRelease, self).save(*args, **kwargs)
47  
-
  44
+    
48 45
     @property
49 46
     def human_version(self):
50 47
         """
2  fabfile.py
@@ -72,7 +72,7 @@ def update_docs():
72 72
     """
73 73
     Force an update of the docs on the server.
74 74
     """
75  
-    managepy('update_docs -v2', site='docs')
  75
+    managepy('update_docs', site='docs')
76 76
 
77 77
 def copy_db():
78 78
     """

0 notes on commit 45632fc

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