{ "info": { "author": "Maykin Media, Robin Ramael, Sergei Maertens", "author_email": "robin.ramael@maykinmedia.nl,sergei@maykinmedia.nl", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.10", "Framework :: Django :: 1.9", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "# Django-bureaucracy\n\nDjango-Bureaucracy is a small wrapper around the [bureacracy](https://bitbucket.org/maykinmedia/bureaucracy)\npackage that can be used to generate word and pdf documents from .docx-templates \nusing Mailmerge fields.\n\n\n## Installation:\n\n```\npip install --process-dependency-links -e git+https://bitbucket.org/maykinmedia/django-bureaucracy.git#egg=django_bureaucracy-0.1\n```\n\n(Note that setuptools is annoying and that this doesn't work without the\n`--process-dependency-links` flag which is deprecated. Have fun figuring out\nhow to do this when it's removed.)\n\n... and then add `django_bureaucracy` to `INSTALLED_APPS`.\n\n## Usage \n\n### Example\n\n\n```python\n\nfrom django_bureaucracy.models import Document\n\n# The document model is used to store a template and render documents from a context:\n\ndoc = Document(\n template_file=File(open('sample.docx')),\n type='tps_report',\n validate_fields=True,\n)\n\ndoc.save()\n\n\ncontext = {\n 'table': Table(data=[['this is the first cell of the first row', 'this is the second cell of the first row'],\n ['the second row', 'etc'], \n ['etc', 'etc']], \n headers=['header 1', 'header 2']),\n 'image': Image('pigeon.jpg')\n 'html': HTML(\"
bold-notbold