[Cubicweb] docutils broken with CubicWeb
Dimitri Papadopoulos Orfanos
dimitri.papadopoulos at cea.fr
Thu Apr 7 12:00:15 CEST 2016
Doesn't work when resetting "default_stylesheet_path" from within
Perhaps there are some CubicWeb functions I should monkey patch.
There might be other global variables initialized in docutils using the
initial value of "default_stylesheet_path". I should probably reset
these variables too. But how to find which global variables need to be
Le 07/04/2016 11:44, Dimitri Papadopoulos Orfanos a écrit :
> Hi Denis,
> Since reload() does not seem to be working (at least not without looking
> into Python internals) I have been trying this in our code, just before
> using docutils:
> import docutils.writers.html4css1
> docutils.writers.html4css1.Writer.default_stylesheet_path = os.path.join(
> docutils.writers.html4css1.Writer.default_template_path = os.path.join(
> ### this used to be the 1st docutils import in our code
> from docutils.core import publish_parts
> Not working either! I'm starting to wonder whether docutils is used
> elsewhere as well, after os.chdir('/') but outside our application.
> Couldn't find anything so far.
> Just to make sure: is site_cubicweb.py a better choice because it is
> called much earlier?
DRF, I2BM, NeuroSpin
F-91191 Gif-sur-Yvette cedex, France
More information about the Cubicweb