genshi

Genshi TemplateSyntaxError on python block where it should work

<?python class += 1 ?> One really simple line of code which definitely should work, but still it gives me this error: TemplateSyntaxError: invalid syntax (file.html, line 22) I shorted the filepath for readability, but that's the exact error. I'm definitely sure it should work, as I've used <?python i += 1 ?> In another file,...

How to print gantt-charts generated on web using python?

I want to print or save gantt-chart(in pdf format). These charts are generated on web after a particular input. Our chart is a plug-in for Trac. I have used Genshi library to generate charts. ...

[genshi] Print string as HTML

Hello, I would like to know if is there any way to convert a plain unicode string to HTML in Genshi, so, for example, it renders newlines as <br/>. I want this to render some text entered in a textarea. Thanks in advance! ...

Javascript templates

Hello, Does anyone know if is there any way to create javascrit templates in Genshi? I mean, I need a .js file where I can use directives like <py:for> and so. Any idea? Thanks! ...

Genshi: TemplateSyntaxError: not well-formed (invalid token) with ampersands in <script> tag

I'm using Pylons/Genshi, and trying to show 'all recent comments' on my site with a Disqus javascript widget (Disqus is installed on the site, and I can post comments OK). However, the code below produces a nasty 500 error: TemplateSyntaxError: not well-formed (invalid token): line 25, column 121 (line 25 is the <script> line). <d...

How can I hide a Trac project from the project listing?

Right now I'm using Trac with multiple projects and have customized the project-listing template a bit, but currently there are about 5 Trac projects, and I only want 4 of them to be showing. I successfully hid the last one by adding a py:if conditional against the exact name of the project, but that seems like a terrible way of doing it...

An HTML template engine for Java like Genshi or Zope's TAL

I need to work with a Web Designer so... Can you suggest me any? Thanks in advance FYI: Zope's TAL The Template Attribute Language (TAL) is a templating language used to generate dynamic HTML and XML pages. Its main goal is to simplify the collaboration between programmers and designers. This is achieved by embedding TAL statement...