This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
===============================
Templated-docs
===============================


.. image:: https://badge.fury.io/py/templated-docs.svg
:target: https://pypi.python.org/pypi/templated_docs

.. image:: https://img.shields.io/travis/alexmorozov/templated-docs.svg
:target: https://travis-ci.org/alexmorozov/templated-docs

.. image:: https://readthedocs.org/projects/templated-docs/badge/?version=latest
:target: https://templated-docs.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

.. image:: https://requires.io/github/alexmorozov/templated-docs/requirements.svg?branch=master
:target: https://requires.io/github/alexmorozov/templated-docs/requirements?branch=master
:alt: Dependencies


Generate templated documents within Django in any format supported by
LibreOffice: texts, spreadsheets, presentations etc.


* Free software: MIT license
* Documentation: https://templated-docs.readthedocs.io.


Requirements
------------

* Python 2.7 or 3.4+
* Django >= 1.8
* A recent LibreOffice version (>=4.3.0) supporting LibreOfficeKit API.

.. include:: docs/partial/libffi-warning.rst

Example usage
-------------

Create a ``sample.odt`` document (make sure it's in OpenDocument format) and
put it in your Django templates folder. It should look something like this:

.. image:: https://github.com/alexmorozov/templated-docs/raw/master/docs/document-template.png

Then write a view to generate documents from this template:

.. code-block:: python

from templated_docs import fill_template
from templated_docs.http import FileResponse

def get_document(request):
"""
A view to get a document filled with context variables.
"""
context = {'user': request.user} # Just an example

filename = fill_template('sample.odt', context, output_format='pdf')
visible_filename = 'greeting.pdf'

return FileResponse(filename, visible_filename)

Navigate to the url your view is connected to, and you'll see a rendered and converted document:

.. image:: https://github.com/alexmorozov/templated-docs/raw/master/docs/generated-document.png

For more examples, see the ``examples/`` subfolder in the repository. More detailed documentation is available on https://templated-docs.readthedocs.io.

Credits
---------

Templated-docs was written by `Alex Morozov`_.

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
.. _pylokit: https://github.com/xrmx/pylokit
.. _`Alex Morozov`: http://morozov.ca
Release History

Release History

0.3.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.10

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.9

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.7

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.6

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
templated_docs-0.3.1-py2.py3-none-any.whl (18.4 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Oct 17, 2016
templated_docs-0.3.1.tar.gz (45.7 kB) Copy SHA256 Checksum SHA256 Source Oct 17, 2016

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