deschler/django-modeltranslation — pull request #131 by benoitbryon (2013-01-21 11:02:27+00:00)
Title: Allow sphinx-autodoc to introspect translated fields

I'm using [Sphinx autodoc] (http://sphinx-doc.org/tutorial.html#autodoc) and [Sphinx apidoc] (http://sphinx-doc.org/invocation.html#invocation-of-sphinx-apidoc) to generate documentation about code, including my application models. Some of them use django-modeltranslation.

Sphinx introspects the models classes and tries to get documentation (__doc__ attribute) of each class member, including translated fields.

Currently, django-modeltranslation raises a ValueError when Sphinx tries to access fields' doc, and Sphinx autodoc fails.

This pull-request proposes a fix where the ValueError exception is replaced with logging: developers keep getting warned, and Sphinx-autodoc succeeds.