{ "info": { "author": "G Adventures", "author_email": "software@gadventures.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "# django-reports-admin\n\nA Django Admin add-on which adds functionality to export data in customized forms of output,\n\n## Requirements\n\nDjango Reports Admin requires Django 1.10 or later, and is written for Python 3.5 or later.\n\n## Installation\n\n pip install django-reports-admin\n\nThen, amend your Django `settings.py` file:\n\n INSTALLED_APPS = (\n ...\n 'reports',\n ...\n )\n\nAlthough enabled by default, you'll want to ensure\n`django.contrib.contenttypes`` is within `INSTALLED_APPS`.\n\n## Usage\n\nCreating reports requires subclassing the `ModelReport` class and identifying a\nreport. This can be done with a few lines of code if you simply want to extract\nthe admin list view for verbatim. For example:\n\n # This file can be named anything, but it lives well within the admin.py or\n # models.py as it'll ensure your register() command is run.\n # yourapp/reports.py -- This file can be named anything\n\n from reports.base import ModelReport\n\n class MyReport(ModelReport)\n name = \"Report - My Report\"\n\nThen, register the `ModelReport` against a model:\n\n # yourapp/admin.py\n\n from .reports import MyReport\n from .models import MyModel\n\n reports.register(MyModel, MyReport)\n\nUpon registration, you'll see a new action with the Django Admin for that Model,\nwith whatever name you've provided in the `name` attribute.\n\nFor advanced report modification, subclass the following functions within your\n`ModelReport` class:\n\n`get_field_lookups` returns a list of column name-value/callback tuples. This\nfunction is a great way to modify the columns of the report, and the exact\noutput of each field. It is useful if you wish to create a calculated field, or\nformat a date field.\n\n`get_row_data` returns a dictionary of the data to be entered for each row.\nGenerally you should not need to modify this as `get_field_lookups` will be\nsufficient.\n\n`generate_output` can be modified to adjust the type of output. By default, a\nCSV file is generated.\n\n## Usage In Shell And Tests\n\nIt may be useful for you to test a report via code, either as a test or a quick\nshell script. This is done without much stress:\n\n # Assuming a defined ModelReport\n from reports.base import ModelReport\n from .models import MyModel\n\n class MyReport(ModelReport):\n queryset = MyModel.objects.all()\n\n # Instantiate the report, and run it through various means\n\n report = MyReport()\n\n # Create a SavedReport instance\n report.run_report()\n\n # Raw output of the report (as CSV, by default)\n report.generate_output()\n\n # Output list of OrderedDicts\n report.collect_data()\n\n\n## Testing\n\nTests are run using `pytest`, and the test suite can be executed using the\nMakeFile\n\n make test\n\n\n# 1.0.0\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/gadventures/django-reports-admin", "keywords": "django reports admin", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-reports-admin", "package_url": "https://pypi.org/project/django-reports-admin/", "platform": "", "project_url": "https://pypi.org/project/django-reports-admin/", "project_urls": { "Homepage": "https://github.com/gadventures/django-reports-admin" }, "release_url": "https://pypi.org/project/django-reports-admin/1.0.4/", "requires_dist": null, "requires_python": "", "summary": "A Django Admin add-on which adds functionality to export data in customized forms of output.", "version": "1.0.4" }, "last_serial": 2674498, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "c78506c1b68a871fe5f54f820b153e01", "sha256": "9010c321f20e5504629325ea02254e34637e28e4bff1504b0c4e5ba0de5fda59" }, "downloads": -1, "filename": "django-reports-admin-1.0.1.tar.gz", "has_sig": false, "md5_digest": "c78506c1b68a871fe5f54f820b153e01", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8933, "upload_time": "2017-02-10T16:14:24", "url": "https://files.pythonhosted.org/packages/da/f2/9ef9543fd053ebe3db686dcf1eb991c01998b57810b16860039907a13de2/django-reports-admin-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "4bdba7b1b96056348f028a35545e18e7", "sha256": "4b323ad8100159be8ea8512f1521bfa9bbc80973a565c07f5aba61fca70d0604" }, "downloads": -1, "filename": "django-reports-admin-1.0.2.tar.gz", "has_sig": false, "md5_digest": "4bdba7b1b96056348f028a35545e18e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9575, "upload_time": "2017-02-10T19:34:45", "url": "https://files.pythonhosted.org/packages/00/f5/240aa5c1dcdec68d9ca5ce41826b6b26f8c7842f7db2bb3d651b52d5b59a/django-reports-admin-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "b19906c6ebffe4277388bae2fa64fc84", "sha256": "a66cd5c1fc5ef85de197b9f19a540d6fe3fc0ff6e7573622ac004f5eea7a55da" }, "downloads": -1, "filename": "django-reports-admin-1.0.3.tar.gz", "has_sig": false, "md5_digest": "b19906c6ebffe4277388bae2fa64fc84", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12036, "upload_time": "2017-02-27T21:30:23", "url": "https://files.pythonhosted.org/packages/62/cb/22bced51113bb020734dde1a5f1967733cfa60d6cf8350aef75fcd5dcb9b/django-reports-admin-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "98ccc341afdf343f5df0184824c7a5b6", "sha256": "49eb89383a88722cfb39b99fe10c77d223e0543b9634df649474bb4544415353" }, "downloads": -1, "filename": "django-reports-admin-1.0.4.tar.gz", "has_sig": false, "md5_digest": "98ccc341afdf343f5df0184824c7a5b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12038, "upload_time": "2017-03-01T02:02:21", "url": "https://files.pythonhosted.org/packages/0c/ce/87385deae4148ed79319f6116a0ecff487d67d5c07cce25c479107dbe66e/django-reports-admin-1.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "98ccc341afdf343f5df0184824c7a5b6", "sha256": "49eb89383a88722cfb39b99fe10c77d223e0543b9634df649474bb4544415353" }, "downloads": -1, "filename": "django-reports-admin-1.0.4.tar.gz", "has_sig": false, "md5_digest": "98ccc341afdf343f5df0184824c7a5b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12038, "upload_time": "2017-03-01T02:02:21", "url": "https://files.pythonhosted.org/packages/0c/ce/87385deae4148ed79319f6116a0ecff487d67d5c07cce25c479107dbe66e/django-reports-admin-1.0.4.tar.gz" } ] }