{ "info": { "author": "Scott Sharkey", "author_email": "ssharkey@lanshark.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.11", "Framework :: Django :: 2.0", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Application Frameworks" ], "description": "lanshark-django-xhtml2pdf\n#########################\n\nAttention\n=============================\n\nThis is a fork of the https://gitlab.com/lansharkconsulting/django/lanshark-django-xhtml2pdf project.\n\nThis project is wrapper code between the django project and the xhtml2pdf\nproject, both have a few maintaining so maybe are not ideal for your project.\n\nWhat it does is simply allow people to create xhtml2pdf templates using all the\ncool django things like STATIC_URL etc.. (like one would for a webpage\ntemplate), and the utils function makes all the images and resources appear in\nthe pdf.\n\nThis release (0.0.5) supports Django 2.0, and Python 3.6.\n\nNOTE:\n\nWhile this project is being maintained on a limited basis for legacy projects,\nwe recommend strongly that new projects consider using\n`WeasyPrint `.\n\nUsage\n=====\n\nSimply do the following::\n\n from django_xhtml2pdf.utils import generate_pdf\n\n def myview(response):\n resp = HttpResponse(content_type='application/pdf')\n result = generate_pdf('my_template.html', file_object=resp)\n return result\n\nClass-based views\n=================\n\nYou can use the provided PdfMixin with any view that subclasses TemplateView,\nexample::\n\n from django.views.generic.detail import DetailView\n from django_xhtml2pdf.views import PdfMixin\n from .models import Product\n\n class ProductPdfView(PdfMixin, DetailView):\n model = Product\n template_name = \"product_pdf.html\"\n\nIt will output the rendered content of the view in pdf.\n\nDecorator\n============\n\nSimply do the following::\n\n from django_xhtml2pdf.utils import pdf_decorator\n\n @pdf_decorator\n def myview(request):\n return render(request, 'mytemplate.html')\n\nChange the pdf file name::\n\n from django_xhtml2pdf.utils import pdf_decorator\n\n @pdf_decorator(pdfname='new_filename.pdf')\n def myview(request):\n return render(request, 'mytemplate.html')\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/lansharkconsulting/django/lanshark-django-xhtml2pdf/", "keywords": "", "license": "BSD License", "maintainer": "", "maintainer_email": "", "name": "lanshark-django-xhtml2pdf", "package_url": "https://pypi.org/project/lanshark-django-xhtml2pdf/", "platform": "OS Independent", "project_url": "https://pypi.org/project/lanshark-django-xhtml2pdf/", "project_urls": { "Homepage": "https://gitlab.com/lansharkconsulting/django/lanshark-django-xhtml2pdf/" }, "release_url": "https://pypi.org/project/lanshark-django-xhtml2pdf/0.0.6/", "requires_dist": [ "Django", "xhtml2pdf" ], "requires_python": "", "summary": "A Django app to generate pdfs from templates", "version": "0.0.6" }, "last_serial": 3933964, "releases": { "0.0.5": [ { "comment_text": "", "digests": { "md5": "1f673c522cc248593320e73af20a9dca", "sha256": "4ec1e99af9a8566e4a7fe46342a9c342a71c248ffd7594430a81b7ac909b7a8e" }, "downloads": -1, "filename": "lanshark_django_xhtml2pdf-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "1f673c522cc248593320e73af20a9dca", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4787, "upload_time": "2018-06-02T19:03:55", "url": "https://files.pythonhosted.org/packages/31/08/a63e111f13a8db1a58d7b0ebf2a8aba4244ca47abb3e4b9477e997426550/lanshark_django_xhtml2pdf-0.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d74d4a91579e08cf1b62517bde5d5f78", "sha256": "f59499ae74a17c38a3aa9067d1a842691e8bd15de324849bfd60269672b2825f" }, "downloads": -1, "filename": "lanshark-django-xhtml2pdf-0.0.5.tar.gz", "has_sig": false, "md5_digest": "d74d4a91579e08cf1b62517bde5d5f78", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 43088, "upload_time": "2018-06-02T19:03:56", "url": "https://files.pythonhosted.org/packages/a6/60/6a89cc0d50bf5d4111a9bf265bdf8d7fef2819ade8391b86a1b55b2e9fa3/lanshark-django-xhtml2pdf-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "e8b2b250789b2bb5ad07635ade675b07", "sha256": "f7b5dc583d57dce415a7fd119bf3b250521cbe68fb4e95915f3125665bf8cc8b" }, "downloads": -1, "filename": "lanshark_django_xhtml2pdf-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "e8b2b250789b2bb5ad07635ade675b07", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4791, "upload_time": "2018-06-05T21:20:36", "url": "https://files.pythonhosted.org/packages/3a/22/e61d27397f1bd4a5632d2677212d803e34634008539df540718fa4407919/lanshark_django_xhtml2pdf-0.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ae4d103029bff703ac8ec52da7ff5822", "sha256": "ce7bb2973de23b569e89adf6f4ab03a562c2bcc2255b3fb31cb48c3f7faf3789" }, "downloads": -1, "filename": "lanshark-django-xhtml2pdf-0.0.6.tar.gz", "has_sig": false, "md5_digest": "ae4d103029bff703ac8ec52da7ff5822", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 43119, "upload_time": "2018-06-05T21:20:37", "url": "https://files.pythonhosted.org/packages/c4/31/84451ba8235d59a0715f3a87bc445990aa6a4df70f8631f0bed456ec9a69/lanshark-django-xhtml2pdf-0.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e8b2b250789b2bb5ad07635ade675b07", "sha256": "f7b5dc583d57dce415a7fd119bf3b250521cbe68fb4e95915f3125665bf8cc8b" }, "downloads": -1, "filename": "lanshark_django_xhtml2pdf-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "e8b2b250789b2bb5ad07635ade675b07", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4791, "upload_time": "2018-06-05T21:20:36", "url": "https://files.pythonhosted.org/packages/3a/22/e61d27397f1bd4a5632d2677212d803e34634008539df540718fa4407919/lanshark_django_xhtml2pdf-0.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ae4d103029bff703ac8ec52da7ff5822", "sha256": "ce7bb2973de23b569e89adf6f4ab03a562c2bcc2255b3fb31cb48c3f7faf3789" }, "downloads": -1, "filename": "lanshark-django-xhtml2pdf-0.0.6.tar.gz", "has_sig": false, "md5_digest": "ae4d103029bff703ac8ec52da7ff5822", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 43119, "upload_time": "2018-06-05T21:20:37", "url": "https://files.pythonhosted.org/packages/c4/31/84451ba8235d59a0715f3a87bc445990aa6a4df70f8631f0bed456ec9a69/lanshark-django-xhtml2pdf-0.0.6.tar.gz" } ] }