{ "info": { "author": "Pablo Martin", "author_email": "goinnn@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": ".. contents::\n\n======================\ndjango-tables2-reports\n======================\n\n.. image:: https://travis-ci.org/goinnn/django-tables2-reports.svg?branch=master\n :target: https://travis-ci.org/goinnn/django-tables2-reports\n\n.. image:: https://badge.fury.io/py/django-tables2-reports.svg\n :target: https://pypi.python.org/pypi/django-tables2-reports\n\nWith django-tables2-reports you can get a report (CSV, XLS) of any `table `_ with **minimal changes** to your project\n\nRequirements\n============\n\n* `Python `_ (supports 2.7, 3.3, 3.4, 3.5, 3.6)\n* `Django `_ (supports 1.3, 1.4, 1.5, 1.6, 1.7, 1.8. 1.9, 1.10, 1.11)\n* `django-tables2 `_ \n* `xlwt `_, `openpyxl `_ or `pyExcelerator `_ (these are optionals, to export to xls; defaults to xlwt if available)\n\n\nInstallation\n============\n\n* In your settings:\n\n::\n\n INSTALLED_APPS = (\n\n 'django_tables2_reports',\n )\n\n\n TEMPLATE_CONTEXT_PROCESSORS = (\n\n 'django.core.context_processors.static',\n\n )\n\n\n # This is optional\n\n EXCEL_SUPPORT = 'xlwt' # or 'openpyxl' or 'pyexcelerator'\n\nChanges in your project\n=======================\n\n1.a Now your table should extend of 'TableReport'\n\n::\n\n ############### Before ###################\n\n import django_tables2 as tables\n\n\n class MyTable(tables.Table):\n\n ...\n\n ############### Now ######################\n\n from django_tables2_reports.tables import TableReport\n\n\n class MyTable(TableReport):\n\n ...\n\n1.b If you want to exclude some columns from report (e.g. if it is a column of buttons), you should set 'exclude_from_report' - the names of columns (as well as property 'exclude' in `table `_)\n\n::\n\n class MyTable(TableReport):\n\n class Meta:\n exclude_from_report = ('column1', ...)\n ...\n\n2.a. If you use a traditional views, now you should use other RequestConfig and change a little your view:\n\n::\n\n ############### Before ###################\n\n from django_tables2 import RequestConfig\n\n\n def my_view(request):\n objs = ....\n table = MyTable(objs)\n RequestConfig(request).configure(table)\n return render_to_response('app1/my_view.html',\n {'table': table},\n context_instance=RequestContext(request))\n\n ############### Now ######################\n\n from django_tables2_reports.config import RequestConfigReport as RequestConfig\n from django_tables2_reports.utils import create_report_http_response\n\n def my_view(request):\n objs = ....\n table = MyTable(objs)\n table_to_report = RequestConfig(request).configure(table)\n if table_to_report:\n return create_report_http_response(table_to_report, request)\n return render_to_response('app1/my_view.html',\n {'table': table},\n context_instance=RequestContext(request))\n\n\nIf you have a lot of tables in your project, you can activate the middleware, and you do not have to change your views, only the RequestConfig import\n\n::\n\n # In your settings \n\n MIDDLEWARE_CLASSES = (\n\n 'django_tables2_reports.middleware.TableReportMiddleware',\n )\n\n ############### Now (with middleware) ######################\n\n from django_tables2_reports.config import RequestConfigReport as RequestConfig\n\n def my_view(request):\n objs = ....\n table = MyTable(objs)\n RequestConfig(request).configure(table)\n return render_to_response('app1/my_view.html',\n {'table': table},\n context_instance=RequestContext(request))\n\n\n2.b. If you use a `Class-based views `_:\n\n::\n\n ############### Before ###################\n\n from django_tables2.views import SingleTableView\n\n\n class PhaseChangeView(SingleTableView):\n table_class = MyTable\n model = MyModel\n\n\n ############### Now ######################\n\n from django_tables2_reports.views import ReportTableView\n\n\n class PhaseChangeView(ReportTableView):\n table_class = MyTable\n model = MyModel\n\n\nUsage\n=====\n\nUnder the table appear a CSV icon (and XLS icon if you have `xlwt `_, `openpyxl `_ or `pyExcelerator `_ in your python path), if you click in this icon, you get a CSV report (or xls report) with every item of the table (without pagination). The ordering works!\n\n\nDevelopment\n===========\n\nYou can get the last bleeding edge version of django-tables2-reports by doing a clone\nof its git repository::\n\n git clone https://github.com/goinnn/django-tables2-reports\n\n\nTest project\n============\n\nIn the source tree, you will find a directory called 'test_project'. It contains\na readily setup project that uses django-tables2-reports. You can run it as usual:\n\n::\n\n cd test_project\n export PYTHONPATH=..\n python manage.py syncdb --noinput\n python manage.py runserver\n\n\nReleases\n========\n\n0.1.0 (2017-06-19)\n------------------\n* maintenance release, \n* Django 1.8, 1.9, 1.10, 1.11 support,\n* openpyxl > 2.0.0 support,\n* recent django-tables2 support,\n* new maintainer `Micha\u0142 Pasternak `_\n\n0.0.10 (2014-10-13)\n-------------------\n* Fixes for xlsx Content-Type:\n * django-tables2-reports throws 500 Sever Error when report format is not recognized. 404 is more appropriate in this case.\n * django-tables2-reports sets Content-Type to application/vnd.ms-excel for xlsx files which causes warnings in Firefox. application/vnd.openxmlformats-officedocument.spreadsheetml.sheet is the correct Content-Type for xlsx\n* Support to Django 1.7 (I'm sorry to the delay)\n* Adding new feature: exclude_from_report\n* And a little details\n* Thanks to:\n * `Ramana Varanasi `_\n * `Mihas `_\n * `Paulgueltekin `_\n * `David Ray `_\n\n0.0.9 (2013-11-30)\n------------------\n* Compatible with the future version of Django (>=1.7)\n* Update the tests\n* Refactor the code\n* Fix a bug when the title of the sheet is longer than 31\n* Thanks to:\n * `Pavel Zaytsev `_\n\n\n0.0.8 (2013-11-14)\n------------------\n* `Refactor the csv_to_excel module `_. In the next release this package will be a pypi egg.\n* Support for `openpyxl `_\n* Integration with travis and coveralls\n* Fix an error if you use the theme paleblue\n* Fix test with python 3\n* Fix some details\n* Test project\n* Thanks to:\n * `Micha\u0142 Pasternak `_\n * `Mark Jones `_\n\n0.0.7 (2013-08-29)\n------------------\n\n* Russian translations\n* Thanks to:\n * `Armicron `_\n\n\n0.0.6 (2013-08-22)\n-------------------\n\n* Python3 support\n* Polish translation\n* Thanks to:\n * `Micha\u0142 Pasternak `_\n\n0.0.5 (2013-07-03)\n-------------------\n\n* Improvements in the README\n* Exportable to XLS with `xlwt `_\n* Thanks to:\n * `Crashy23 `_\n * `Gamesbook `_\n * And spatially to `Austin Phillips `_\n\n\n0.0.4 (2013-05-17)\n-------------------\n\n* Escape csv data correctly during output\n* The fields with commas now are not split into multiple columns\n* Thanks to:\n * `Austin Phillips `_\n\n0.0.3 (2012-07-19)\n-------------------\n\n* Fix a little error, when a column has line breaks. Now these are changed to espaces\n* Details\n\n0.0.2 (2012-07-18)\n-------------------\n\n* Add a default view (https://docs.djangoproject.com/en/dev/topics/class-based-views/)\n* Exportable to XLS\n* Update the README\n\n0.0.1 (2012-07-17)\n-------------------\n\n* Initial release\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/goinnn/django-tables2-reports", "keywords": "django", "license": "LGPL 3", "maintainer": "", "maintainer_email": "", "name": "django-tables2-reports", "package_url": "https://pypi.org/project/django-tables2-reports/", "platform": "", "project_url": "https://pypi.org/project/django-tables2-reports/", "project_urls": { "Homepage": "https://github.com/goinnn/django-tables2-reports" }, "release_url": "https://pypi.org/project/django-tables2-reports/0.1.3/", "requires_dist": null, "requires_python": "", "summary": "With django-tables2-reports you can get a report (CSV, XLS) of any django-tables2 with minimal changes to your project", "version": "0.1.3" }, "last_serial": 2996667, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "ecb2b0f59801a8588387d4931a270aa8", "sha256": "3cddb1b8cfd51bba07119b2398068f34edd43d9e78a2172779e28544dfd2100f" }, "downloads": -1, "filename": "django-tables2-reports-0.0.1.tar.gz", "has_sig": false, "md5_digest": "ecb2b0f59801a8588387d4931a270aa8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7439, "upload_time": "2012-07-17T16:27:57", "url": "https://files.pythonhosted.org/packages/5c/e9/a589ba3dc16539c16644598a534c3c407ecd69900276227cd4073265538c/django-tables2-reports-0.0.1.tar.gz" } ], "0.0.10": [ { "comment_text": "", "digests": { "md5": "b26e8777cb896a81d7d95c65d04fa2bb", "sha256": "47172bb349d01a4b0e26bfbf8c43325566e9d877730dd3b2e04802123c39aba4" }, "downloads": -1, "filename": "django-tables2-reports-0.0.10.tar.gz", "has_sig": false, "md5_digest": "b26e8777cb896a81d7d95c65d04fa2bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19748, "upload_time": "2014-10-13T16:20:04", "url": "https://files.pythonhosted.org/packages/bc/4a/ed678c914fd55b548bb943d43458acc14660a7e01639bb52530619162970/django-tables2-reports-0.0.10.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "d629960063a6d1b02eddd2987687644f", "sha256": "19bb71ec1d92a6069566f95ea30bd88a28942018c66545f23c1fa84fb4cb2571" }, "downloads": -1, "filename": "django-tables2-reports-0.0.2.tar.gz", "has_sig": false, "md5_digest": "d629960063a6d1b02eddd2987687644f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14093, "upload_time": "2012-07-18T14:04:57", "url": "https://files.pythonhosted.org/packages/ef/16/987f6d5041c032865c2e3dff6f1be1b0f765e8ec59a4cad13fad03f56c07/django-tables2-reports-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "edcf96aa91abfccedbe1c4b41c718137", "sha256": "789e372d7aa587131acfa325633d1239e9542ab6fcfc2c80f379ce124960c134" }, "downloads": -1, "filename": "django-tables2-reports-0.0.3.tar.gz", "has_sig": false, "md5_digest": "edcf96aa91abfccedbe1c4b41c718137", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14275, "upload_time": "2012-07-19T14:11:02", "url": "https://files.pythonhosted.org/packages/63/a6/8c9226d37d63d701aef6fa5fe666d6e9fb8303bbd68bd38a753df02d6894/django-tables2-reports-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "64b803304990e6c90cace2eefd6578c0", "sha256": "bf3f1457f12d27538a7f8b1b8c3e23c4fa07aaff58ce0b2d53917689475f4595" }, "downloads": -1, "filename": "django-tables2-reports-0.0.4.tar.gz", "has_sig": false, "md5_digest": "64b803304990e6c90cace2eefd6578c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16305, "upload_time": "2013-05-17T07:01:53", "url": "https://files.pythonhosted.org/packages/b4/ac/9e97ac99246c104ce15e5c1bd631fd4895713bcb05e42a27b3b6d8d9b133/django-tables2-reports-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "2f1c83d527c3e89a24738f32f21acc0d", "sha256": "ebd7f0a4a910e761a53a2e85da17a23981100ff0172a445f61d7ca762ff97559" }, "downloads": -1, "filename": "django-tables2-reports-0.0.5.tar.gz", "has_sig": false, "md5_digest": "2f1c83d527c3e89a24738f32f21acc0d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15638, "upload_time": "2013-07-03T08:24:41", "url": "https://files.pythonhosted.org/packages/21/cb/86ac2e8984ad8ed6de0b81e4e7122f93653e01c36923c0c0d354c99798da/django-tables2-reports-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "6f739ff1b320c45fc182cda692a13955", "sha256": "18f432cf38e0a88bad56fe389a186ef91ecd35c2b6dd9fa1bd75508a3080b8cc" }, "downloads": -1, "filename": "django-tables2-reports-0.0.6.tar.gz", "has_sig": false, "md5_digest": "6f739ff1b320c45fc182cda692a13955", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17685, "upload_time": "2013-08-22T12:23:55", "url": "https://files.pythonhosted.org/packages/9c/17/2e1074c754792f774468c6df1d0efe59f3ab1a85aa9059ed543787e97212/django-tables2-reports-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "399d799ce3ea206b08a4985e1c5b36cd", "sha256": "d07f287a63ab1e2e929c02fdbb6fedc3c6512f6c6401b415c748e10c756431c8" }, "downloads": -1, "filename": "django-tables2-reports-0.0.7.tar.gz", "has_sig": false, "md5_digest": "399d799ce3ea206b08a4985e1c5b36cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18014, "upload_time": "2013-08-29T06:47:53", "url": "https://files.pythonhosted.org/packages/f0/2c/76eb36facc556d424e7d7447ad284d39d31234ade7a27d161ee4cab89d27/django-tables2-reports-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "feeb1c0a92bbcc123ca18de9fe8f11d1", "sha256": "b2dabd0229840a5fb57d170ccc59a1e0458d8a1520d631af8bcd23054f90e30d" }, "downloads": -1, "filename": "django-tables2-reports-0.0.8.tar.gz", "has_sig": false, "md5_digest": "feeb1c0a92bbcc123ca18de9fe8f11d1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19211, "upload_time": "2013-11-14T19:38:30", "url": "https://files.pythonhosted.org/packages/56/8d/998c6a536a439a6d7961aadddae96fef44c8b93e1fd54bf1b3f8ec84053d/django-tables2-reports-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "949fbcc2ab3229b0f582348543db22c6", "sha256": "98f9b649bad72ece28ee296c2c2f8624ad3baa35ba9f3264637d4811cef42c19" }, "downloads": -1, "filename": "django-tables2-reports-0.0.9.tar.gz", "has_sig": false, "md5_digest": "949fbcc2ab3229b0f582348543db22c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19519, "upload_time": "2013-11-30T19:02:36", "url": "https://files.pythonhosted.org/packages/f4/f9/aab669f4587525a7008cfaf5d3b3c4192a8ff425192aca029e238c3243b5/django-tables2-reports-0.0.9.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "7612ba00c0b144f0d26ec6d257e9c9c6", "sha256": "3305ccd376953a685121e2eb6f4d815d85ad85d1b47c01a0616da41698099a3e" }, "downloads": -1, "filename": "django_tables2_reports-0.1.0-py2-none-any.whl", "has_sig": false, "md5_digest": "7612ba00c0b144f0d26ec6d257e9c9c6", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 34619, "upload_time": "2017-06-19T17:04:02", "url": "https://files.pythonhosted.org/packages/ad/94/64eab0bb55e1466f949340a213398980d5d30c14aa2f67e50f63696ee9f8/django_tables2_reports-0.1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7ef71997403b17b7f6d1d05397d11c78", "sha256": "4c565ee012bf523412e3ec771027974e5138a3748642fd917e749c3ebdd5ca93" }, "downloads": -1, "filename": "django-tables2-reports-0.1.0.tar.gz", "has_sig": false, "md5_digest": "7ef71997403b17b7f6d1d05397d11c78", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21484, "upload_time": "2017-06-19T17:03:58", "url": "https://files.pythonhosted.org/packages/24/91/e977fee8d873d41003930fd2ca5aa9ae099e1358a7ba817191bdd94fec18/django-tables2-reports-0.1.0.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "9fbc281f0de3ba697e7d34bd3d149420", "sha256": "02c99c443426f62a8b397ee3b120f137380a82619be6d361336979b6d72a80ba" }, "downloads": -1, "filename": "django_tables2_reports-0.1.2-py2-none-any.whl", "has_sig": false, "md5_digest": "9fbc281f0de3ba697e7d34bd3d149420", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 34642, "upload_time": "2017-07-03T12:52:27", "url": "https://files.pythonhosted.org/packages/ee/3d/cd8dbec7befed853cd60936f19192f715d8b961ed729b350607ae9c4b07d/django_tables2_reports-0.1.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "30a67b97695b432b34479feb0b8bad9b", "sha256": "9334baf5450b51f2a047f2e87fcc6a69c9a108b22d2e42ac7dbb2af6a9b73942" }, "downloads": -1, "filename": "django-tables2-reports-0.1.2.tar.gz", "has_sig": false, "md5_digest": "30a67b97695b432b34479feb0b8bad9b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21539, "upload_time": "2017-07-03T12:52:23", "url": "https://files.pythonhosted.org/packages/9a/e3/dff0a999069f2a34dc61a4e678ef6a19a285c4712ec7c761fe9221ee1e13/django-tables2-reports-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "279ee5ef54cbf6b88928f200d2b6315d", "sha256": "2fb934c0191d84a8ff2700092e261fa501d65fae3426381ca94c0a2344b6048c" }, "downloads": -1, "filename": "django_tables2_reports-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "279ee5ef54cbf6b88928f200d2b6315d", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 34642, "upload_time": "2017-07-03T12:55:44", "url": "https://files.pythonhosted.org/packages/cc/b7/6a56258a32e212008a363858d64e00245f6cc056e703a378bdbc25f53242/django_tables2_reports-0.1.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e29e150b13755ddf67a559dc9e749ff4", "sha256": "10ee0fa91649c4812e955450e25f6303b16e7656a732d55e092e68af0870addb" }, "downloads": -1, "filename": "django-tables2-reports-0.1.3.tar.gz", "has_sig": false, "md5_digest": "e29e150b13755ddf67a559dc9e749ff4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21552, "upload_time": "2017-07-03T12:55:41", "url": "https://files.pythonhosted.org/packages/03/4b/675c57ee0ad44b816bab5637cfb914da2388059f532ddc378e10ff6b6600/django-tables2-reports-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "279ee5ef54cbf6b88928f200d2b6315d", "sha256": "2fb934c0191d84a8ff2700092e261fa501d65fae3426381ca94c0a2344b6048c" }, "downloads": -1, "filename": "django_tables2_reports-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "279ee5ef54cbf6b88928f200d2b6315d", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 34642, "upload_time": "2017-07-03T12:55:44", "url": "https://files.pythonhosted.org/packages/cc/b7/6a56258a32e212008a363858d64e00245f6cc056e703a378bdbc25f53242/django_tables2_reports-0.1.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e29e150b13755ddf67a559dc9e749ff4", "sha256": "10ee0fa91649c4812e955450e25f6303b16e7656a732d55e092e68af0870addb" }, "downloads": -1, "filename": "django-tables2-reports-0.1.3.tar.gz", "has_sig": false, "md5_digest": "e29e150b13755ddf67a559dc9e749ff4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21552, "upload_time": "2017-07-03T12:55:41", "url": "https://files.pythonhosted.org/packages/03/4b/675c57ee0ad44b816bab5637cfb914da2388059f532ddc378e10ff6b6600/django-tables2-reports-0.1.3.tar.gz" } ] }