All Projects → alexmorozov → Templated Docs

alexmorozov / Templated Docs

Licence: mit
Generate PDF, MS Word and Excel documents from templates in Django

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Templated Docs

Mrdoc
online document system developed based on python. It is suitable for individuals and small teams to manage documents, wiki, knowledge and notes. like gitbook.
Stars: ✭ 1,129 (+1168.54%)
Mutual labels:  document-management, django
Mayan Edms
Repository mirror of GtLab: https://gitlab.com/mayan-edms/mayan-edms Please use the upstream repository for issues and pull requests.
Stars: ✭ 398 (+347.19%)
Mutual labels:  document-management, django
Mayan Edms
Free Open Source Document Management System (mirror, no pull request or issues)
Stars: ✭ 226 (+153.93%)
Mutual labels:  document-management, django
Papermerge
Open Source Document Management System for Digital Archives (Scanned Documents)
Stars: ✭ 1,177 (+1222.47%)
Mutual labels:  document-management, django
Swarfarm
SWARFARM - Assistant website for Summoner's War
Stars: ✭ 87 (-2.25%)
Mutual labels:  django
Djurl
Simple yet helpful library for writing Django urls by an easy, short and intuitive way.
Stars: ✭ 85 (-4.49%)
Mutual labels:  django
Django Rules
Awesome Django authorization, without the database
Stars: ✭ 1,255 (+1310.11%)
Mutual labels:  django
Django Fakery
🏭 An easy-to-use implementation of Creation Methods for Django, backed by Faker.
Stars: ✭ 84 (-5.62%)
Mutual labels:  django
Community
Modern Confluence alternative designed for internal & external docs, built with Golang + EmberJS
Stars: ✭ 1,286 (+1344.94%)
Mutual labels:  document-management
Cride Platzi
REST API project used to teach Django on Platzi
Stars: ✭ 88 (-1.12%)
Mutual labels:  django
Ariadne
Ariadne is a Python library for implementing GraphQL servers using schema-first approach.
Stars: ✭ 1,274 (+1331.46%)
Mutual labels:  django
Dpress
A simple blog powered by Django
Stars: ✭ 85 (-4.49%)
Mutual labels:  django
Python Sparkpost
SparkPost client library for Python
Stars: ✭ 87 (-2.25%)
Mutual labels:  django
Wagtail Torchbox
Wagtail build of Torchbox.com
Stars: ✭ 84 (-5.62%)
Mutual labels:  django
Distributed Multi User Scrapy System With A Web Ui
Django based application that allows creating, deploying and running Scrapy spiders in a distributed manner
Stars: ✭ 88 (-1.12%)
Mutual labels:  django
Mezzanine Api
RESTful web API for Mezzanine CMS
Stars: ✭ 84 (-5.62%)
Mutual labels:  django
Shynet
Modern, privacy-friendly, and detailed web analytics that works without cookies or JS.
Stars: ✭ 1,273 (+1330.34%)
Mutual labels:  django
Django Mfa2
A Django app that handles MFA, it supports TOTP, U2F, FIDO2 U2F (Webauthn), Email Token and Trusted Devices
Stars: ✭ 88 (-1.12%)
Mutual labels:  django
Pybooks
python books
Stars: ✭ 87 (-2.25%)
Mutual labels:  django
Muckrock
MuckRock's source code - Please report bugs, issues and feature requests to [email protected]
Stars: ✭ 86 (-3.37%)
Mutual labels:  django

=============================== 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.

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].