diff -r 18f3582d965e docs/_ext/djangodocs.py
--- a/docs/_ext/djangodocs.py	Fri May 28 17:25:43 2010 +0000
+++ b/docs/_ext/djangodocs.py	Tue Jul 20 09:18:51 2010 -0300
@@ -88,7 +88,10 @@
     if not is_nextversion:
         if len(arguments) == 1:
             linktext = 'Please, see the release notes <releases-%s>' % (arguments[0])
-            xrefs = sphinx.roles.xfileref_role('ref', linktext, linktext, lineno, state)
+            try:
+                xrefs = sphinx.roles.XRefRole()('ref', linktext, linktext, lineno, state) # Sphinx >= 1.0
+            except:
+                xrefs = sphinx.roles.xfileref_role('ref', linktext, linktext, lineno, state) # Sphinx < 1.0
             node.extend(xrefs[0])
         node['version'] = arguments[0]
     else:
@@ -100,26 +103,33 @@
         if content:
             state.nested_parse(content, content_offset, node)
         ret = ret + messages
-    env.note_versionchange(node['type'], node['version'], node, lineno)
+    if sphinx.__version__ >= '1.0':
+        env.versionchanges.setdefault(node['version'], []).append(
+            (node['type'], env.temp_data['docname'], lineno,
+            env.temp_data.get('py_module'),
+            env.temp_data.get('object'),
+            node.astext()))
+    else:
+        env.note_versionchange(node['type'], node['version'], node, lineno)
     return ret
 
-                
+
 class SuppressBlockquotes(docutils.transforms.Transform):
     """
     Remove the default blockquotes that encase indented list, tables, etc.
     """
     default_priority = 300
-    
+
     suppress_blockquote_child_nodes = (
-        docutils.nodes.bullet_list, 
-        docutils.nodes.enumerated_list, 
+        docutils.nodes.bullet_list,
+        docutils.nodes.enumerated_list,
         docutils.nodes.definition_list,
-        docutils.nodes.literal_block, 
-        docutils.nodes.doctest_block, 
-        docutils.nodes.line_block, 
+        docutils.nodes.literal_block,
+        docutils.nodes.doctest_block,
+        docutils.nodes.line_block,
         docutils.nodes.table
     )
-    
+
     def apply(self):
         for node in self.document.traverse(docutils.nodes.block_quote):
             if len(node.children) == 1 and isinstance(node.children[0], self.suppress_blockquote_child_nodes):
@@ -133,16 +143,16 @@
     # Don't use border=1, which docutils does by default.
     def visit_table(self, node):
         self.body.append(self.starttag(node, 'table', CLASS='docutils'))
-    
+
     # <big>? Really?
     def visit_desc_parameterlist(self, node):
         self.body.append('(')
         self.first_param = 1
-    
+
     def depart_desc_parameterlist(self, node):
         self.body.append(')')
         pass
-        
+
     #
     # Don't apply smartypants to literal blocks
     #
@@ -153,13 +163,13 @@
     def depart_literal_block(self, node):
         sphinx_htmlwriter.SmartyPantsHTMLTranslator.depart_literal_block(self, node)
         self.no_smarty -= 1
-        
+
     #
     # Turn the "new in version" stuff (versoinadded/versionchanged) into a
     # better callout -- the Sphinx default is just a little span,
     # which is a bit less obvious that I'd like.
     #
-    # FIXME: these messages are all hardcoded in English. We need to chanage 
+    # FIXME: these messages are all hardcoded in English. We need to change
     # that to accomodate other language docs, but I can't work out how to make
     # that work and I think it'll require Sphinx 0.5 anyway.
     #
@@ -168,7 +178,7 @@
         'versionchanged':   'Changed in Django %s',
         'versionadded':     'New in Django %s',
     }
-    
+
     def visit_versionmodified(self, node):
         self.body.append(
             self.starttag(node, 'div', CLASS=node['type'])
@@ -178,17 +188,17 @@
             len(node) and ":" or "."
         )
         self.body.append('<span class="title">%s</span> ' % title)
-    
+
     def depart_versionmodified(self, node):
         self.body.append("</div>\n")
-    
+
     # Give each section a unique ID -- nice for custom CSS hooks
     # This is different on docutils 0.5 vs. 0.4...
 
     if hasattr(sphinx_htmlwriter.SmartyPantsHTMLTranslator, 'start_tag_with_title') and sphinx.__version__ == '0.4.2':
         def start_tag_with_title(self, node, tagname, **atts):
             node = {
-                'classes': node.get('classes', []), 
+                'classes': node.get('classes', []),
                 'ids': ['s-%s' % i for i in node.get('ids', [])]
             }
             return self.starttag(node, tagname, **atts)
@@ -212,7 +222,10 @@
 def parse_django_adminopt_node(env, sig, signode):
     """A copy of sphinx.directives.CmdoptionDesc.parse_signature()"""
     from sphinx import addnodes
-    from sphinx.directives.desc import option_desc_re
+    try:
+        from sphinx.domains.std import option_desc_re # Sphinx >= 1.0
+    except:
+        from sphinx.directives.desc import option_desc_re # Sphinx < 1.0
     count = 0
     firstname = ''
     for m in option_desc_re.finditer(sig):
@@ -235,7 +248,7 @@
         import cPickle as pickle
     except ImportError:
         import pickle
-    
+
     def handle_finish(self):
         # dump the global context
         outfilename = path.join(self.outdir, 'globalcontext.pickle')
