On Thu, Sep 3, 2009 at 00:38, TiNo <tin...@gmail.com> wrote:

> Hi,
> I am trying to set up a sort of smal CMS where the input is
> RestructuredText. The restructured text is parsed by a templatetag with the
> following code (taken from the PyCon rst project):
>
> @register.filter
> def restructuredparts(value, **overrides):
>     """return the restructured text parts"""
>     try:
>         from docutils.core import publish_parts
>     except ImportError:
>         if settings.DEBUG:
>             raise template.TemplateSyntaxError, "Error in {%
> restructuredtext %} filter: The Python docutils library isn't installed."
>         return value
>     else:
>         docutils_settings = dict(getattr(settings,
> "RESTRUCTUREDTEXT_FILTER_SETTINGS", {}))
>         docutils_settings.update(overrides)
>         if 'halt_level' not in docutils_settings:
>             docutils_settings['halt_level'] = 6
>         return publish_parts(source=value, writer_name="html4css1",
> settings_overrides=docutils_settings)
>
>
> On my local machine everything works fine, but on my deployment server it
> gives this error:
>
> [Errno 2] No such file or directory:
> '/lib/python2.5/docutils-0.5-py2.5.egg/docutils/writers/html4css1/html4css1.css'
>
> This only happens when django is running. In django shell or python shell
> everything works fine. The correct css file is located at
> /home/tinodb/lib/python2.5/docutils-0.5-py2.5.egg/docutils
> /writers/html4css1/html4css1.css
>
> There is a default docutils installed on the server (webfaction), but by
> checking in the shell the correct docutils is imported. Shell and fastfcgi
> deamons are run under the same user.
>
> Does anybody knows why my fastcgi deamon want to import a stylesheet from
> this location?
>

Nobody any idea?

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

Reply via email to