{ "info": { "author": "Christopher Glass", "author_email": "tribaal@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Application Frameworks" ], "description": "Django xhtml2pdf\n################\n\nAttention\n=============================\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\nPlease get in touch if you would like to take over maintainership.\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 ressources appear in\nthe pdf.\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 de 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": "", "keywords": "", "license": "BSD License", "maintainer": "", "maintainer_email": "", "name": "django-xhtml2pdf", "package_url": "https://pypi.org/project/django-xhtml2pdf/", "platform": "OS Independent", "project_url": "https://pypi.org/project/django-xhtml2pdf/", "project_urls": null, "release_url": "https://pypi.org/project/django-xhtml2pdf/0.0.4/", "requires_dist": [ "Django (>=1.11)", "xhtml2pdf (>=0.2.2)" ], "requires_python": "", "summary": "A Django app to generate pdfs from templates", "version": "0.0.4" }, "last_serial": 3993752, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "00a62b094a153b3facafd58d7d902fa2", "sha256": "f173ac8324240cbeed12eeb63d5996c6b03093627720f0de808e521423b0da21" }, "downloads": -1, "filename": "django-xhtml2pdf-0.0.1.tar.gz", "has_sig": false, "md5_digest": "00a62b094a153b3facafd58d7d902fa2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2659, "upload_time": "2011-08-25T10:13:51", "url": "https://files.pythonhosted.org/packages/c0/17/14eac702c17e9a054f80214fafc04d4c9b1d3071107d70c639c297d9d360/django-xhtml2pdf-0.0.1.tar.gz" } ], "0.0.1.dev0": [], "0.0.2": [ { "comment_text": "", "digests": { "md5": "0c48a2936578f28b667e4ed0de312b91", "sha256": "29a0db37ed11eae4e4d9b2282d947ce4536f0817f7b91be12e355170ee48cf57" }, "downloads": -1, "filename": "django-xhtml2pdf-0.0.2.tar.gz", "has_sig": false, "md5_digest": "0c48a2936578f28b667e4ed0de312b91", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3772, "upload_time": "2011-08-30T09:00:51", "url": "https://files.pythonhosted.org/packages/2f/45/19026eb5f6edf40d518707d2b01542a03f43c7c4462763916cf3def69bc4/django-xhtml2pdf-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "507a56a6924a60a8eee9048e49b999f3", "sha256": "981034b3e632b8670e2c7015bb56689c2f529d648ee054ae817b21d92a8cc7db" }, "downloads": -1, "filename": "django-xhtml2pdf-0.0.3.tar.gz", "has_sig": false, "md5_digest": "507a56a6924a60a8eee9048e49b999f3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3773, "upload_time": "2011-08-30T09:38:39", "url": "https://files.pythonhosted.org/packages/cf/62/9c93c6b11fc7a29940f7cf44f771a386688f64cc21dd996ae22a0ed0991c/django-xhtml2pdf-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "126ebd28eb3053d45e7c8f89c0ad0540", "sha256": "84595fd7f242efffc1682eaf6646f237cb4823cda14e81b9cd642f6c790edd4e" }, "downloads": -1, "filename": "django_xhtml2pdf-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "126ebd28eb3053d45e7c8f89c0ad0540", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6240, "upload_time": "2018-06-23T22:19:58", "url": "https://files.pythonhosted.org/packages/08/ff/92fc2d8e6e8bbd93237cc57c3a25ddea8ff016de31f5e488f1b2dfd29f46/django_xhtml2pdf-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6590a953be251cdb0919b2b5b8db0769", "sha256": "e91f4ea6033fb0eb9ae3869fe764df3c756c22897b526587aef008fb04d69871" }, "downloads": -1, "filename": "django-xhtml2pdf-0.0.4.tar.gz", "has_sig": false, "md5_digest": "6590a953be251cdb0919b2b5b8db0769", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4744, "upload_time": "2018-06-23T22:19:59", "url": "https://files.pythonhosted.org/packages/11/96/6828e583a56884bc5661a46afcbf9f67b5badb9b4fd55277d843c7d358d8/django-xhtml2pdf-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "126ebd28eb3053d45e7c8f89c0ad0540", "sha256": "84595fd7f242efffc1682eaf6646f237cb4823cda14e81b9cd642f6c790edd4e" }, "downloads": -1, "filename": "django_xhtml2pdf-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "126ebd28eb3053d45e7c8f89c0ad0540", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6240, "upload_time": "2018-06-23T22:19:58", "url": "https://files.pythonhosted.org/packages/08/ff/92fc2d8e6e8bbd93237cc57c3a25ddea8ff016de31f5e488f1b2dfd29f46/django_xhtml2pdf-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6590a953be251cdb0919b2b5b8db0769", "sha256": "e91f4ea6033fb0eb9ae3869fe764df3c756c22897b526587aef008fb04d69871" }, "downloads": -1, "filename": "django-xhtml2pdf-0.0.4.tar.gz", "has_sig": false, "md5_digest": "6590a953be251cdb0919b2b5b8db0769", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4744, "upload_time": "2018-06-23T22:19:59", "url": "https://files.pythonhosted.org/packages/11/96/6828e583a56884bc5661a46afcbf9f67b5badb9b4fd55277d843c7d358d8/django-xhtml2pdf-0.0.4.tar.gz" } ] }