Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Render OpenDocument files from templates, using Appy POD

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 djappypod
Octocat-spinner-32 .gitignore
Octocat-spinner-32 CHANGES
Octocat-spinner-32 LICENSE
Octocat-spinner-32 MANIFEST.in
Octocat-spinner-32 README.rst
Octocat-spinner-32 setup.py
README.rst

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

INSTALL

pip install django-appypod

Requires appy.pod in python path. It has to be deployed manually, since it does not come with any setup.py.

A possibility is to create a .pth file in your site-packages folder, or modify sys.path on-the-fly.

Alternatively, if you use buildout, a few lines do the job :

[buildout]
extra-paths += src/appy-archive/
parts += download-appy-archive

[download-appy-archive]
recipe = hexagonit.recipe.download
url = https://launchpad.net/appy/0.8/0.8.1/+download/appy-0.8.1.zip
destination = src/appy-archive/

USAGE

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
Something went wrong with that request. Please try again.