Opened 13 years ago
Closed 13 years ago
#17177 closed Bug (duplicate)
Building django documentation with Sphinx 1.1
Reported by: | Oleksandr Gavenko | Owned by: | Dan Poirier |
---|---|---|---|
Component: | Documentation | Version: | 1.3 |
Severity: | Normal | Keywords: | |
Cc: | Oleksandr Gavenko | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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!
Change History (3)
comment:1 by , 13 years ago
Cc: | added |
---|
comment:2 by , 13 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 13 years ago
Resolution: | → duplicate |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Duplicate of #15649.