]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- updates to work with the latest sphinx
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 15 Sep 2010 16:02:46 +0000 (12:02 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 15 Sep 2010 16:02:46 +0000 (12:02 -0400)
doc/build/builder/builders.py
doc/build/templates/site_base.mako

index e604278a32f50a207e9625d673a81577991e22e3..b82480ad3a9e2d91fcba68dd394d3a24d9b6c231 100644 (file)
@@ -27,6 +27,8 @@ class MakoBridge(TemplateBridge):
         context['prevtopic'] = context.pop('prev', None)
         context['nexttopic'] = context.pop('next', None)
         context['mako_layout'] = self.layout == 'html' and 'static_base.mako' or 'site_base.mako'
+        # sphinx 1.0b2 doesn't seem to be providing _ for some reason...
+        context.setdefault('_', lambda x:x)
         return self.lookup.get_template(template).render_unicode(**context)
         
     
@@ -34,6 +36,8 @@ class MakoBridge(TemplateBridge):
         context['prevtopic'] = context.pop('prev', None)
         context['nexttopic'] = context.pop('next', None)
         context['mako_layout'] = self.layout == 'html' and 'static_base.mako' or 'site_base.mako'
+        # sphinx 1.0b2 doesn't seem to be providing _ for some reason...
+        context.setdefault('_', lambda x:x)
         return Template(template, lookup=self.lookup,
             format_exceptions=True, 
             imports=[
@@ -62,7 +66,7 @@ class PyConWithSQLLexer(RegexLexer):
             ],
             'sqlpopup':[
                 (
-                    r'(.*?\n)((?:PRAGMA|BEGIN|SELECT|INSERT|DELETE|ROLLBACK|COMMIT|UPDATE|CREATE|DROP|PRAGMA|DESCRIBE).*?(?:{stop}\n*|$))',
+                    r'(.*?\n)((?:PRAGMA|BEGIN|SELECT|INSERT|DELETE|ROLLBACK|COMMIT|ALTER|UPDATE|CREATE|DROP|PRAGMA|DESCRIBE).*?(?:{stop}\n?|$))',
                     bygroups(using(PythonConsoleLexer), Token.Sql.Popup), 
                     "#pop"
                 )
@@ -91,7 +95,7 @@ class PythonWithSQLLexer(RegexLexer):
             ],
             'sqlpopup':[
                 (
-                    r'(.*?\n)((?:PRAGMA|BEGIN|SELECT|INSERT|DELETE|ROLLBACK|COMMIT|UPDATE|CREATE|DROP|PRAGMA|DESCRIBE).*?(?:{stop}\n*|$))',
+                    r'(.*?\n)((?:PRAGMA|BEGIN|SELECT|INSERT|DELETE|ROLLBACK|COMMIT|ALTER|UPDATE|CREATE|DROP|PRAGMA|DESCRIBE).*?(?:{stop}\n?|$))',
                     bygroups(using(PythonLexer), Token.Sql.Popup), 
                     "#pop"
                 )
index 36bd0d973bad0f0a5231c999fd95734746410a35..6dc2ebb3fd2cb5b4219f6d4db594029a2a4f3542 100644 (file)
@@ -7,7 +7,7 @@
 </%text>
 
 <div style="text-align:right">
-<b>Quick Select:</b> <a href="/docs/06/">0.6</a> | <a href="/docs/05/">0.5</a> | <a href="/docs/04/">0.4</a><br/>
+<b>Quick Select:</b> <a href="/docs/06/">0.6</a> | <a href="/docs/05/">0.5</a><br/>
 <b>PDF Download:</b> <a href="${pathto('sqlalchemy_' + release.replace('.', '_') + '.pdf', 1)}">download</a>
 </div>