#17177: Building django documentation with Sphinx 1.1
-------------------------------+--------------------
     Reporter:  gavenkoa       |      Owner:  nobody
         Type:  Bug            |     Status:  new
    Component:  Documentation  |    Version:  1.3
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 I install **python-sphinx** from Cygwin:
 {{{
   $ cygcheck.exe -c python-sphinx
 Cygwin Package Information
 Package              Version        Status
 python-sphinx        1.1-1          OK
 }}}
 Get Django from official mirror:
 {{{
   $ hg clone https://bitbucket.org/django/django
   $ hg up -r releases/1.3.1
 }}}
 and try build **html** docs:
 {{{
   $ cd docs
   $ make html
 }}}
 I get error:
 {{{
 sphinx-build -b djangohtml -d _build/doctrees   . _build/html
 Running Sphinx v1.1
 loading pickled environment... done
 building [djangohtml]: targets for 205 source files that are out of date
 updating environment: [config changed] 205 added, 0 changed, 0 removed
 reading sources... [100%] topics/testing
 looking for now-outdated files... none found
 pickling environment... done
 checking consistency... done
 preparing documents... done
 writing output... [  5%] howto/apache-auth
 Exception occurred:
   File "/usr/lib/python2.6/site-packages/sphinx/writers/html.py", line
 522, in visit_row
     self._table_row_index += 1
 AttributeError: DjangoHTMLTranslator instance has no attribute
 '_table_row_index'
 }}}
 I go to **docs/_ext/djangodocs.py** class **DjangoHTMLTranslator** and
 just add **_table_row_index** field. Next build stoped at:
 {{{
   $ make html
 sphinx-build -b djangohtml -d _build/doctrees   . _build/html
 Running Sphinx v1.1
 loading pickled environment... done
 building [djangohtml]: targets for 205 source files that are out of date
 updating environment: 0 added, 0 changed, 0 removed
 looking for now-outdated files... none found
 preparing documents... done
 writing output... [  7%] howto/custom-management-commands
 Exception occurred:
   File "/usr/lib/python2.6/site-packages/sphinx/writers/html.py", line
 125, in visit_desc_parameter
     self.body.append(self.param_separator)
 AttributeError: DjangoHTMLTranslator instance has no attribute
 'param_separator'
 }}}
 So I add **param_separator** to **DjangoHTMLTranslator**. So I get:
 {{{
 class DjangoHTMLTranslator(SmartyPantsHTMLTranslator):
     """
     Django-specific reST to HTML tweaks.
     """

     _table_row_index = 0
     param_separator = ', '

     ....
 }}}
 After this I succesfully build Djando docs!

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17177>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to