Django WeasyPrint CBV
Project description
A class-based view that generated PDFs using WeasyPrint
Usage
Use WeasyTemplateView as class based view base class or the just the mixin WeasyTemplateResponseMixin on a TemplateView (or subclass thereof).
Example
from django.conf import settings
from django.views.generic import DetailView
from django_weasyprint import WeasyTemplateResponseMixin
class MyModelView(DetailView):
model = MyModel
template_name = 'mymodel.html'
class MyModelViewPrintView(WeasyTemplateResponseMixin, MyModelView):
stylesheets = [
settings.STATIC_ROOT + "css/app.css",
]
History
2017-02-02: finally pushed new release to pypi
2016-02-08: forked to merge open pull requests
2016-01-13: official repository taken over from https://github.com/dekkers/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django_weasyprint-0.5.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff2137a810608668aa6aef405c8e559c1429d424393c5cea9b5a034a0d02e6e7 |
|
MD5 | 39c07e024540f05f15545d2bdd3c3d8b |
|
BLAKE2b-256 | 807cbf0df0c6e5b8bce60ae72523a004c0b88cb47cee2d3f40d187a4fa72d775 |