{ "info": { "author": "Maxime Haineault", "author_email": "haineault@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "django-pdfutils\n===============\n\nA simple django app to generate PDF documents.\n\n\nInstallation\n------------\n\n1. In your `settings.py`, add `pdfutils` to your `INSTALLED_APPS`.\n2. `(r'^reports/', include(pdfutils.site.urls)),` to your `urls.py`\n3. Add `pdfutils.autodiscover()` to your `urls.py`\n4. Create a `report.py` file in any installed django application.\n5. Create your report(s)\n6. Profit!\n\n**Note**: If you are using buildout, don't forget to put `pdfutils` \nin your `eggs` section or else the django-pdfutils dependencies wont\nbe installed.\n\n\nExample report\n--------------\n\nReports are basically views with custom methods and properties.\n\n.. code-block:: python\n\n # -*- coding: utf-8 -*-\n\n from django.contrib.auth.models import User\n from django.core.urlresolvers import reverse\n from django.utils.translation import ugettext as _\n\n from pdfutils.reports import Report\n from pdfutils.sites import site\n\n\n class MyUserReport(Report):\n title = _('Users')\n template_name = 'myapp/reports/users-report.html'\n slug = 'users-report'\n orientation = 'portrait'\n\n def get_users(self):\n return User.objects.filter(is_staff=True)\n\n def get_styles(self):\n \"\"\"\n It is possible to add or override style like so\n \"\"\"\n self.add_styles('myapp/css/users-report.css')\n return super(AccountStatementReport, self).get_styles()\n\n def filename(self):\n \"\"\"\n The filename can be generated dynamically and translated\n \"\"\"\n return _('Users-report-%(count)s.pdf') % {'count': self.get_users().count() }\n\n def get_context_data(self):\n \"\"\"\n Context data is injected just like a normal view\n \"\"\"\n context = super(AccountStatementReport, self).get_context_data()\n context['user_list'] = self.get_users()\n return context\n\n site.register(MyUserReport)\n\n\nThe slug should obviously be unique since it is used to build the report URL.\n\nFor example, with the default settings and URLs, the URL for report above would be `/reports/users-report/`.\n\nExample template\n----------------\n\n.. code-block:: html\n\n \n \n {{ STYLES|safe }}\n \n \n \n Add ?format=html for easy template debug\n \n \n\nSome template variables are injected by default in reports:\n\n* title\n* slug\n* orientation\n* MEDIA_URL\n* STATIC_URL\n* STYLES\n\n\nOverriding default CSS\n----------------------\n\nSince the default CSS (base.css, portrait.css, landscape.css) are normal static files, they can be overrided \nfrom any other django app which has a `pdfutils` folder in their static folder.\n\nNote: Be sure your applications are listed in the right order in `INSTALLED_APPS` !\n\n\nDependencies\n------------\n\n* django >=1.4, < 1.5.99\n* decorator == 3.4.0, <= 3.9.9\n* PIL == 1.1.7\n* reportlab == 2.5\n* html5lib == 0.90\n* httplib2 == 0.9\n* pyPdf == 1.13\n* xhtml2pdf == 0.0.4\n* django-xhtml2pdf == 0.0.3\n\n**Note**: dependencies versions are specified in `setup.py`. The amount of time required to find the right\ncombination of dependency versions is largely to blame for the creation of this project.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/h3/django-pdfutils", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "PDFutils", "package_url": "https://pypi.org/project/PDFutils/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/PDFutils/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/h3/django-pdfutils" }, "release_url": "https://pypi.org/project/PDFutils/1.1.3/", "requires_dist": null, "requires_python": null, "summary": "Django PDFutils", "version": "1.1.3" }, "last_serial": 1500962, "releases": { "1.0.0": [], "1.0.1": [ { "comment_text": "", "digests": { "md5": "8bfa67a3bf5062bd3e08e34e1649b970", "sha256": "18a5e7c8f63da025e9cf10474703b03edcf1f64ac7c3808d546e550c90e5bc54" }, "downloads": -1, "filename": "PDFutils-1.0.1.tar.gz", "has_sig": false, "md5_digest": "8bfa67a3bf5062bd3e08e34e1649b970", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7512, "upload_time": "2015-03-27T01:07:53", "url": "https://files.pythonhosted.org/packages/e2/09/e246aebd59c77be29d4c7bc022588adc7e6016e96dfa9de6df47c46c500b/PDFutils-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "c417a74bd29cf9ade87a7687d83267f9", "sha256": "d73e5c928c598e8976ac685f69b8efea75f490b941ff24b7f618748f12c60a38" }, "downloads": -1, "filename": "PDFutils-1.0.2.tar.gz", "has_sig": false, "md5_digest": "c417a74bd29cf9ade87a7687d83267f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7517, "upload_time": "2015-03-27T01:18:00", "url": "https://files.pythonhosted.org/packages/2c/20/61ce29b7bb7f7700c201ebb702fdd672ca5af0028384495f27001298ffd4/PDFutils-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "aaf1340d6705de96ed3aa512b67c6a66", "sha256": "5a89b8e755c087dd3b8955189fc0cd9effd43a5ef7eaf7ad8f23f2f5d4fb72b0" }, "downloads": -1, "filename": "PDFutils-1.0.3.tar.gz", "has_sig": false, "md5_digest": "aaf1340d6705de96ed3aa512b67c6a66", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7856, "upload_time": "2015-03-27T01:31:19", "url": "https://files.pythonhosted.org/packages/85/d2/078ed8b5da37b1a283af254d2e5857fe4a11ba9d342623cfd13f25e8fd43/PDFutils-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "5ab4a51ee4af9a3470ff04a4b1f4aff6", "sha256": "720b084bf07aba51149bb622f14d79f625fa092059435887171ec658cea2a094" }, "downloads": -1, "filename": "PDFutils-1.0.4.tar.gz", "has_sig": false, "md5_digest": "5ab4a51ee4af9a3470ff04a4b1f4aff6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7862, "upload_time": "2015-03-27T03:59:23", "url": "https://files.pythonhosted.org/packages/05/6e/d73e20b7fe788994be1385d7937ec08e9a29368d87ab8fdee4fe33a8f46d/PDFutils-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "4010598da48050024ec739ebc3a23b74", "sha256": "32481f9e4c906a043c2dd39d40ba0586bea8dde6c363fcf19f006e657a76711f" }, "downloads": -1, "filename": "PDFutils-1.0.5.tar.gz", "has_sig": false, "md5_digest": "4010598da48050024ec739ebc3a23b74", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7866, "upload_time": "2015-03-27T04:02:36", "url": "https://files.pythonhosted.org/packages/12/17/52da87e09f384d882b54105d42cda7952a71d0eb702c86e87ffe4ebea1b4/PDFutils-1.0.5.tar.gz" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "4ea44f9a628f360fa0c6cb452eb81f92", "sha256": "600efab63d0b9be9e07edde0a374f132c20333435306569f982bd5b690c4769d" }, "downloads": -1, "filename": "PDFutils-1.0.6.tar.gz", "has_sig": false, "md5_digest": "4ea44f9a628f360fa0c6cb452eb81f92", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9376, "upload_time": "2015-03-27T04:16:44", "url": "https://files.pythonhosted.org/packages/32/df/ace3255bc7953b139751234149527e895bfb58df7495bc14d4ba2da0b12f/PDFutils-1.0.6.tar.gz" } ], "1.0.7": [ { "comment_text": "", "digests": { "md5": "d59620c9bd745fcddceed2452804cd75", "sha256": "3e7d31b1d1952268b2bc413525a6da2df03f5b368fe6f6f5e7bfee6323a0b325" }, "downloads": -1, "filename": "PDFutils-1.0.7.tar.gz", "has_sig": false, "md5_digest": "d59620c9bd745fcddceed2452804cd75", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10211, "upload_time": "2015-03-28T01:54:17", "url": "https://files.pythonhosted.org/packages/78/d2/077b298aa99b9d19a2212f9081ba9207209ecdbb76d0fc227e1fc69bf470/PDFutils-1.0.7.tar.gz" } ], "1.0.8": [ { "comment_text": "", "digests": { "md5": "0256c768597f8b400a0952d4bbf633c7", "sha256": "c320f11b95fd3581a93b6caae1fb93199c919373bcc3f6c6d5776059dca16b06" }, "downloads": -1, "filename": "PDFutils-1.0.8.tar.gz", "has_sig": false, "md5_digest": "0256c768597f8b400a0952d4bbf633c7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10192, "upload_time": "2015-03-28T02:19:50", "url": "https://files.pythonhosted.org/packages/51/6c/a9d70436747dbb6499d39aca688c71d21d1c15659be083e126544fccd850/PDFutils-1.0.8.tar.gz" } ], "1.0.9": [ { "comment_text": "", "digests": { "md5": "d0c5867893847fa4395ef032469b688b", "sha256": "f64d3660c62f10351cd4c5f935ac96fe4cad619e765d724bada6cf6b5ac71502" }, "downloads": -1, "filename": "PDFutils-1.0.9.tar.gz", "has_sig": false, "md5_digest": "d0c5867893847fa4395ef032469b688b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10193, "upload_time": "2015-03-28T04:16:00", "url": "https://files.pythonhosted.org/packages/9a/e3/a0a4ae90797ddb06abea634a3f972c07e95d721d98188ecc030144902eca/PDFutils-1.0.9.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "6344a11e1252b90ab0f74b40105a8da6", "sha256": "6aeaa3286d82735531c28a8cbd23847a7554ba8d3745e0f103c01c127da34c40" }, "downloads": -1, "filename": "PDFutils-1.1.0.tar.gz", "has_sig": false, "md5_digest": "6344a11e1252b90ab0f74b40105a8da6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10193, "upload_time": "2015-03-28T04:18:58", "url": "https://files.pythonhosted.org/packages/a0/8e/3cbcdacae4fa57470fc62d45980e9f016032c425f52c29e7041300b01724/PDFutils-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "7420ff3ec2ec140c7abb3c014179a477", "sha256": "ff9980f521c900732c48f28c33a27241882eb3ef7c7a049240ddb5357fa89563" }, "downloads": -1, "filename": "PDFutils-1.1.1.tar.gz", "has_sig": false, "md5_digest": "7420ff3ec2ec140c7abb3c014179a477", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8528, "upload_time": "2015-03-28T04:21:30", "url": "https://files.pythonhosted.org/packages/76/4d/936df3e276c0199f42b54d00c848d8cd397a10d8761ffd4c60a85fa9219d/PDFutils-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "9979cbf0f1e8d0de3e992d4a944e2e6e", "sha256": "c8fee2c96ca820f93a8412c032a411cc1c1f997609eb46a4c66d34fc0186ed09" }, "downloads": -1, "filename": "PDFutils-1.1.2.tar.gz", "has_sig": false, "md5_digest": "9979cbf0f1e8d0de3e992d4a944e2e6e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8398, "upload_time": "2015-03-31T03:34:08", "url": "https://files.pythonhosted.org/packages/b4/07/4f269cf2d54b6179906eea1598d56803676f1576f6f2ac36de57eeb5a2a1/PDFutils-1.1.2.tar.gz" } ], "1.1.3": [ { "comment_text": "", "digests": { "md5": "f1408173a90204147a294cfa0d150595", "sha256": "c7cf4dfef2d15dd86b758a2c77a6737579531cf47548b9ba02e923838dadbc9f" }, "downloads": -1, "filename": "PDFutils-1.1.3.tar.gz", "has_sig": false, "md5_digest": "f1408173a90204147a294cfa0d150595", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8431, "upload_time": "2015-04-11T03:05:18", "url": "https://files.pythonhosted.org/packages/64/0a/5291856751192d34c9ecc4ed4d072fd14c37f02aa6986c89e69fb5bee630/PDFutils-1.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f1408173a90204147a294cfa0d150595", "sha256": "c7cf4dfef2d15dd86b758a2c77a6737579531cf47548b9ba02e923838dadbc9f" }, "downloads": -1, "filename": "PDFutils-1.1.3.tar.gz", "has_sig": false, "md5_digest": "f1408173a90204147a294cfa0d150595", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8431, "upload_time": "2015-04-11T03:05:18", "url": "https://files.pythonhosted.org/packages/64/0a/5291856751192d34c9ecc4ed4d072fd14c37f02aa6986c89e69fb5bee630/PDFutils-1.1.3.tar.gz" } ] }