Render OpenDocument files from templates, using Appy POD
Python
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
djappypod Move to python 3 May 7, 2018
.gitignore Remove from appy.pod module Sep 11, 2012
CHANGES Back to development May 7, 2018
LICENSE Initial import Sep 10, 2012
MANIFEST.in Initial import Sep 10, 2012
README.rst Upgrade to Django 1.8 Jan 14, 2017
setup.py Back to development May 7, 2018

README.rst

django-appypod allows to serve OpenDocument Text files (.odt) from templates and contexts, using Appy POD framework.

INSTALL

pip install django-appypod

USAGE

In settings, add OdtTemplates template backend before DjangoTemplates one :

TEMPLATES = [
{
'BACKEND': 'djappypod.backend.OdtTemplates',

}, {

'BACKEND': 'django.template.backends.django.DjangoTemplates', ...

},

]

Using class-based generic views :

from django.view.generic.detail import DetailView

from djappypod.response import OdtTemplateResponse

class YourDocument(DetailView):
    response_class = OdtTemplateResponse
    template_name = "your/template.odt"

Using classic views functions :

def your_view(request):
    response = OdtTemplateResponse(request, "your/template.odt", {
        'title': 'Simple as hello ;)'
    })
    response.render()
    return response

Follow instructions in Appy POD documentation for designing your OpenDocument templates.

AUTHORS

makinacom

LICENSE

  • Lesser GNU Public License