Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

tgext.odt is a Pluggable application for TurboGears2 that allows the rendering of .odt (openoffice/libreoffice) documents as an output templates.

Project Description

About tgextodt

tgextodt is a Pluggable application for TurboGears2 that allows the rendering of .odt (openoffice/libreoffice) documents as an output templates.


tgextodt can be installed both from pypi or from bitbucket:

pip install tgextodt

should just work for most of the users

Plugging tgextodt

In your application config/ import plug, then at the end of the file call plug with tgextodt:

from tgext.pluggable import plug
plug(base_config, 'tgextodt')


To use an odt template you have to declare the type in your controller as below:

@expose('odt:example.templates.about', content_type='application/vnd.oasis.opendocument.text')
def about(self):
    response.headerlist.append(('Content-Disposition', 'attachment;filename=filename.odt'))
    return dict(hello='Hello World')

obviously in your example application in the folder example/templates you should provide a templated named about.odt in wich you have defined the variable field py3o.document.hello.

To define a variable field in libreoffice you can dig more information on basically from the menu Insert -> Fields -> Other -> Variables

For more complex features, like for loops and more detailed reporting stuff, you want to read the documentation of the py3o library itself

Now you can directly download your output from /about or /about.odt

Release History

Release History

This version
History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
tgext.odt-0.2.tar.gz (3.9 kB) Copy SHA256 Checksum SHA256 Source Dec 6, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting