django-appypod 0.0.1

Render OpenDocument files from templates, using Appy POD
django-appypod is a Django app that uses the Appy POD framework to allow you to serve ODT (OpenDocument Text) documents from contexts and templates.

INSTALL

pip install django-appypod

It 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

last updated on:
September 12th, 2012, 11:22 GMT
price:
FREE!
homepage:
github.com
license type:
LGPL (GNU Lesser General Public License) 
developed by:
Mathieu Leplatre
category:
ROOT \ Internet \ HTTP (WWW)
django-appypod
Download Button

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Rate it!

Add your review!

SUBMIT