{ "info": { "author": "Hugo Osvaldo Barrera", "author_email": "hugo@barrera.io", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.10", "Framework :: Django :: 1.11", "License :: OSI Approved :: ISC License (ISCL)", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "django-renderpdf\n================\n\n.. image:: https://travis-ci.org/WhyNotHugo/django-renderpdf.svg?branch=master\n :target: https://travis-ci.org/WhyNotHugo/django-renderpdf\n :alt: Travis CI build status\n\n.. image:: https://codecov.io/gh/WhyNotHugo/django-renderpdf/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/WhyNotHugo/django-renderpdf\n :alt: Codecov coverage report\n\n.. image:: https://img.shields.io/pypi/v/django-renderpdf.svg\n :target: https://pypi.python.org/pypi/django-renderpdf\n :alt: Version on PyPI\n\n.. image:: https://img.shields.io/pypi/l/django-renderpdf.svg\n :target: https://github.com/WhyNotHugo/django-renderpdf/blob/master/LICENCE\n :alt: Licence\n\n**django-renderpdf** is a Django app to render django templates as PDF files.\n\nIntroduction\n------------\n\nRendering PDFs for web developers is generally pretty non-trivial, and there's\nno common approach to doing this. django-renderpdf attempts to allow reusing\nall the known tools and skills when generating a PDF file in a Django app:\n\n* Use Django template files, which are internally rendered as HTML and them PDF\n files.\n* Use staticfiles app to include any CSS or image files.\n* Simply subclass a ``PDFView`` class which has an interface very similar to\n Django's own built-in ``View`` classes.\n\nBackground\n----------\n\ndjango-renderpdf actually started out as code on multiple of my own projects\n(including some public ones).\n\nAfter some time, it became clear that I'd been copy-pasting PDF-related bits\nacross different projects, and since co-workers expressed interest in this\ndesign (using the Django templating system to generate PDFs), it finally made\nsense to move this into a separate library.\n\nBecause of this, documentation is still a work in progress (the code far\noutdates this API being public), and while unit tests are lacking, this code\nhas had ample field testing\n\nUsage example\n-------------\n\nSorry, no docs yet! Though ``PDFView``'s methods has extensive docstrings you\nshould check.\n\nHere's a usage code example for a view that generates some PDF labels for some\nshipments:\n\n.. code-block:: python\n\n class LabelsView(LoginRequiredMixin, PDFView):\n template_name = 'my_app/labels.html'\n\n def get_context_data(self, *args, **kwargs):\n context = super().get_context_data(*args, **kwargs)\n\n context['shipments'] = models.Shipment.objects.filter(\n batch_id=kwargs['pk'],\n )\n\n return context\n\nAnd in ``urls.py``:\n\n.. code-block:: python\n\n url(\n r'^/shipments/labels/(?P\\d+)/$',\n views.LabelsView.as_view(),\n name='shipment_labels',\n ),\n\nLicence\n-------\n\ndjango-renderpdf is licensed under the ISC licence. See LICENCE for details.\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/WhyNotHugo/django-renderpdf", "keywords": "", "license": "ISC", "maintainer": "", "maintainer_email": "", "name": "django-renderpdf", "package_url": "https://pypi.org/project/django-renderpdf/", "platform": "", "project_url": "https://pypi.org/project/django-renderpdf/", "project_urls": { "Homepage": "https://github.com/WhyNotHugo/django-renderpdf" }, "release_url": "https://pypi.org/project/django-renderpdf/1.0.0/", "requires_dist": [ "django", "weasyprint" ], "requires_python": "", "summary": "A django app to render django templates as PDF files.", "version": "1.0.0" }, "last_serial": 3433398, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "78d1ad4c1c5e834269efc2b2795d60b7", "sha256": "e563a1bc2258d7131f6adc783873c3ae67197be65d8edf931cc6942dd41bfe13" }, "downloads": -1, "filename": "django_renderpdf-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "78d1ad4c1c5e834269efc2b2795d60b7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6849, "upload_time": "2017-10-14T22:04:56", "url": "https://files.pythonhosted.org/packages/42/16/bd3a271c999581d79348c24cf94cd5f6c78767d1f9e9094d84411681893b/django_renderpdf-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bad5e54d7667651bd03f35b4be78adc2", "sha256": "0ce7104076f167a323631089b577c17d2f1585a8014eb051b5a54321ac6ccda1" }, "downloads": -1, "filename": "django-renderpdf-0.1.0.tar.gz", "has_sig": false, "md5_digest": "bad5e54d7667651bd03f35b4be78adc2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19011, "upload_time": "2017-10-14T22:04:57", "url": "https://files.pythonhosted.org/packages/e7/25/c58f62d0c9bd41542c90f0686324c7df5434f90665d45ba83bff915b61dc/django-renderpdf-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "890de1b68e62a1b1e51bb453bf0a5ac7", "sha256": "728f540195ecdd2ff0d67aeef2bb5c756af6e0d61f15b3d92fa727a21bbc10f3" }, "downloads": -1, "filename": "django_renderpdf-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "890de1b68e62a1b1e51bb453bf0a5ac7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7916, "upload_time": "2017-10-15T01:48:54", "url": "https://files.pythonhosted.org/packages/5f/32/a77dc509e11455b5fae2b6e49b833673851e086785dbebb956a55345794f/django_renderpdf-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2ed18aedae0ac69a9c0ec3c923818326", "sha256": "2490f77bfb08a95a7aa357978be9290240bb6250a4e4e5942afe401a3d278122" }, "downloads": -1, "filename": "django-renderpdf-0.1.1.tar.gz", "has_sig": false, "md5_digest": "2ed18aedae0ac69a9c0ec3c923818326", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20222, "upload_time": "2017-10-15T01:48:55", "url": "https://files.pythonhosted.org/packages/99/64/f75e1e1f14b01a77b8ce6c9e8bd79e8f57993400d7a85f02cd9734dcedf4/django-renderpdf-0.1.1.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "ab3bddcded0d6d03b710fc55c9094d21", "sha256": "e053a18f2f41cb8dbadc45dd63616e9ead4b829b8f945914ea9982153aa42be3" }, "downloads": -1, "filename": "django_renderpdf-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ab3bddcded0d6d03b710fc55c9094d21", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8155, "upload_time": "2017-12-21T05:08:41", "url": "https://files.pythonhosted.org/packages/f6/9d/939badefa72940ef0109fbe6de18d27f5ed89d2b61a0b050f4b1fd26434e/django_renderpdf-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5b1786a54daf422ff7c125ecc6677a22", "sha256": "c18e6e6cb455396797eebb48306919ccc608344366685ba5afb0d35eefbf1e7e" }, "downloads": -1, "filename": "django-renderpdf-1.0.0.tar.gz", "has_sig": false, "md5_digest": "5b1786a54daf422ff7c125ecc6677a22", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20628, "upload_time": "2017-12-21T05:08:42", "url": "https://files.pythonhosted.org/packages/d6/3e/e9ef0c328722447f7ba45fdc9cd9e66925139469f54f81262527be826924/django-renderpdf-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ab3bddcded0d6d03b710fc55c9094d21", "sha256": "e053a18f2f41cb8dbadc45dd63616e9ead4b829b8f945914ea9982153aa42be3" }, "downloads": -1, "filename": "django_renderpdf-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ab3bddcded0d6d03b710fc55c9094d21", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8155, "upload_time": "2017-12-21T05:08:41", "url": "https://files.pythonhosted.org/packages/f6/9d/939badefa72940ef0109fbe6de18d27f5ed89d2b61a0b050f4b1fd26434e/django_renderpdf-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5b1786a54daf422ff7c125ecc6677a22", "sha256": "c18e6e6cb455396797eebb48306919ccc608344366685ba5afb0d35eefbf1e7e" }, "downloads": -1, "filename": "django-renderpdf-1.0.0.tar.gz", "has_sig": false, "md5_digest": "5b1786a54daf422ff7c125ecc6677a22", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20628, "upload_time": "2017-12-21T05:08:42", "url": "https://files.pythonhosted.org/packages/d6/3e/e9ef0c328722447f7ba45fdc9cd9e66925139469f54f81262527be826924/django-renderpdf-1.0.0.tar.gz" } ] }