django-appypod 0.0.2

Render OpenDocument files from templates, using Appy POD

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

LICENSE

  • Lesser GNU Public License

CHANGELOG

0.0.2 (2013-10-08)

  • Safety check before deleting document
  • Add Django and Appy in dependencies

0.0.1 (2012-09-11)

  • Initial working version.
LPGL, see LICENSE file.

Author

Mathieu Leplatre

Pip

django-appypod==0.0.2

Classifiers

  • Topic :: Utilities
  • Programming Language :: Python :: 2.7
  • Operating System :: OS Independent
  • Natural Language :: English
  • Intended Audience :: Developers
  • Framework :: Django
  • Environment :: Web Environment
  • Development Status :: 5 - Production/Stable
File Type Python Version Uploaded On Downloads
django-appypod-0.0.2.zip Source Oct. 8, 2013 3,643
Version Release Date
0.0.2 Oct. 8, 2013
0.0.1 Sept. 11, 2012
Date Package Version Action
Nov. 4, 2014, 12:51 p.m. django-appypod 0.0.2 Release Created
Nov. 4, 2014, 12:51 p.m. django-appypod 0.0.1 Release Created
Nov. 4, 2014, 12:51 p.m. django-appypod Package Created