{ "info": { "author": "eeriksp", "author_email": "eerik.sven@hotmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 2.0", "Framework :: Django :: 2.1", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "# Django Validation Report\n\nDjango Validation Report (DVR) allows you to control whether all model instances can be resaved without errors.\n\nSuppose you have a Model:\n\n```py\nclass Person(models.Model):\n is_monastic = models.BooleanField()\n monastic_name = models.CharField(max_length=100, blank=True)\n```\n\nLater on, after there are already some Person objects in the database, you add a `clean` method to the model:\n\n```py\n def clean(self):\n if self.is_monastic and not self.monastic_name:\n raise ValidationError(\n \"If a Person is monastic, 'monastic_name' must be specified\")\n```\n\nNow, it would be nice to control whether the old Person objects meet new standards. Otherwise unexpected ValidationErrors might be risen if the old ones are being resaved.\n\nDjango Validation Report offers a solution to this problem.\n\n## Features\n\nDVR provides:\n\n1. a report view for logged in users\n2. a `manage.py` command to show the report on the console\n3. automatic report email sending to admins; this is designed to be addded to your CI/CD script\n\n## Requirements\n\n- Python 3\n- Django 2 (should aslo work with previous versions, but it hasn't been tested. See issue [#1](https://github.com/eeriksp/django-validation-report/issues/1))\n\n## Installation\n\nInstall using pip:\n\n```\npip install django-validation-report\n```\n\nThen add `validation_report` to your INSTALLED_APPS.\n\n```py\nINSTALLED_APPS = [\n ...\n 'validation_report.apps.ValidationReportConfig',\n]\n```\n\nTo your main `urls.py` add:\n\n```py\nurlpatterns = [\n ...\n path('validation-report/', include('validation_report.urls')),\n]\n```\n\nAlso make sure you have specified `LOGIN_URL` in your `settings.py`. In order to see the generated report, the user must be logged in. If you do not have a custom login page, you can just use the default admin login page `LOGIN_URL = '/admin/login/'`.\n\nThe emails are sent to `settings.ADMINS`, so check that this constant has been specified and email sending has been configured.\n\n## Usage\n\n### View\n\nGo to `/validation-report/` URL. As a logged in user, you should see something like this:\n\n```\nValidation report\n\nRun full_clean() for all Django model instances and return a report regarding failures.\n\nValidating 'Person' with id '1' raised [ValidationError([\"If a Person is monastic, 'monastic_name' must be specified\"])]\nValidating 'Person' with id '3' raised [ValidationError([\"If a Person is monastic, 'monastic_name' must be specified\"])]\n\nTask completed, 2 errors detected\n```\n\n\nIf an error occurred and the server stopped delivering the `StreamingHttpResponse` before all model instances were checked, an error message will be shown:\n\n```\nValidation report\n\nRun full_clean() for all Django model instances and return a report regarding failures.\n\nValidating 'Person' with id '1' raised [ValidationError([\"If a Person is monastic, 'monastic_name' must be specified\"])]\n\nERROR: Task was not completed, server response was interrupted.\n```\n\n### `Manage.py` command\n\nType\n\n```\n$ ./manage.py validationreport\n```\nThe given report is similar to the one returned by the view in the previous chapter.\n\n### Email sending\n\nType\n\n```\n$ ./manage.py validationreport --sendmail\n```\nYou should see something like this:\n\n```\nRun `full_clean()` for all Django model instances and return a report regarding failures.\nValidating 'Person' with id '1' raised [ValidationError([\"If a Person is monastic, 'monastic_name' must be specified\"])]\nValidating 'Person' with id '3' raised [ValidationError([\"If a Person is monastic, 'monastic_name' must be specified\"])]\nTask completed, 2 errors detected\n\nThe report was sent to the following addresses:\nabbot@monastery.eu\n```\n\nThis command is especially useful for adding to your CI/CD script, so you will be notified on time and all possible confusion can be avoided.\n\n## License\n\nDVR is published under MIT license.\n\nInspired by [SQLite developers](https://www.sqlite.org/different.html), we add the following blessing:\n\n>May you do good and not evil\\\nMay you find forgiveness for yourself and forgive others\\\nMay you share freely, never taking more than you give.\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/eeriksp/django-validation-report", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "django-validation-report", "package_url": "https://pypi.org/project/django-validation-report/", "platform": "", "project_url": "https://pypi.org/project/django-validation-report/", "project_urls": { "Homepage": "https://github.com/eeriksp/django-validation-report" }, "release_url": "https://pypi.org/project/django-validation-report/1.0.3/", "requires_dist": null, "requires_python": "", "summary": "A Django app, which checks whether all model instances can be resaved without errors", "version": "1.0.3" }, "last_serial": 4339644, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "14f517d2220e27327fa2be2f501282d7", "sha256": "8060d3b277df9def4af13a3d4dbd73d2e1a47540b6c5523412afc7157139b201" }, "downloads": -1, "filename": "django_validation_report-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "14f517d2220e27327fa2be2f501282d7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7438, "upload_time": "2018-10-02T11:30:49", "url": "https://files.pythonhosted.org/packages/5e/5e/7f04bd79758b36f0cd15306077edc3521ffb8c5f846e3c06e72f16b2b45b/django_validation_report-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "97338bb620421415265178f3ea1db7f8", "sha256": "17f1068c9f89c3a46fb4d4c44987f07fd10071d1fbb95162251cdb0e0abfd3ee" }, "downloads": -1, "filename": "django-validation-report-1.0.0.tar.gz", "has_sig": false, "md5_digest": "97338bb620421415265178f3ea1db7f8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5898, "upload_time": "2018-10-02T11:30:50", "url": "https://files.pythonhosted.org/packages/99/8c/eaa19e8435570e8f594913efb2525ecb13762f86249e97a8aea9162332a9/django-validation-report-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "4921c6ef3e2a19e5c03991a1ca00f130", "sha256": "39998131076f5d1e027fefae16cc0992daf06e4e70e4c7d9f6101a6ebb743e37" }, "downloads": -1, "filename": "django_validation_report-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "4921c6ef3e2a19e5c03991a1ca00f130", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8644, "upload_time": "2018-10-03T18:26:36", "url": "https://files.pythonhosted.org/packages/0a/db/b5bf664d2916b819d8928f413e7db25db556cedd53714d7bfa6811835b2a/django_validation_report-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "291508a9442e716f46cc05246404b939", "sha256": "ba8ced15936509567442e90e14284fa155242b21ba674ffe13ccb47552bf77e5" }, "downloads": -1, "filename": "django-validation-report-1.0.1.tar.gz", "has_sig": false, "md5_digest": "291508a9442e716f46cc05246404b939", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6362, "upload_time": "2018-10-03T18:26:38", "url": "https://files.pythonhosted.org/packages/89/e1/ee314feba3f80d4d0005fbd51453b4e7fae60b9318a3833b82c58e749808/django-validation-report-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "74a4aca582ef112982150b09ec617b82", "sha256": "69689cee18ab6c0b49dcf4df85f4d94146a70b2916d2fa66b9dd051e16580565" }, "downloads": -1, "filename": "django_validation_report-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "74a4aca582ef112982150b09ec617b82", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8645, "upload_time": "2018-10-03T18:42:19", "url": "https://files.pythonhosted.org/packages/87/3d/05eb10c35f4d6da18b069395eeca7343bd830727cd02110c21005de01096/django_validation_report-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "da8f7b5de28a35aab269c3f9ca365a5e", "sha256": "f812ee270325b65c060c1cd6c72d9f3bf796be1b7f66752fac4a8401046d86ca" }, "downloads": -1, "filename": "django-validation-report-1.0.2.tar.gz", "has_sig": false, "md5_digest": "da8f7b5de28a35aab269c3f9ca365a5e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6391, "upload_time": "2018-10-03T18:42:20", "url": "https://files.pythonhosted.org/packages/82/4a/7e09a351ea2ceb7ff1ac3f19a0ea47078d1eb3e443f9be1ab6d5a7298faf/django-validation-report-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "a1642b6b564c4bea93a522910e739fa4", "sha256": "1457220c09fc960803e21fc064074637fc9701338ddba9fe6a5b42adda725ab4" }, "downloads": -1, "filename": "django_validation_report-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "a1642b6b564c4bea93a522910e739fa4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8694, "upload_time": "2018-10-04T09:56:09", "url": "https://files.pythonhosted.org/packages/23/95/64db706cb1f30015b1b625026a95102184ee9790ecc8d1080340c6d99d78/django_validation_report-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e5efa407a13330899e4613e475a09294", "sha256": "39029c31e1daf611a5c80e1fd43b46fb58c3a59f39c36ba92816bb869d94d799" }, "downloads": -1, "filename": "django-validation-report-1.0.3.tar.gz", "has_sig": false, "md5_digest": "e5efa407a13330899e4613e475a09294", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6411, "upload_time": "2018-10-04T09:56:10", "url": "https://files.pythonhosted.org/packages/28/b9/aa36e19f9b22ae1f870be89ed54c79af83413dcd2c46e09490b5acc98706/django-validation-report-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a1642b6b564c4bea93a522910e739fa4", "sha256": "1457220c09fc960803e21fc064074637fc9701338ddba9fe6a5b42adda725ab4" }, "downloads": -1, "filename": "django_validation_report-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "a1642b6b564c4bea93a522910e739fa4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8694, "upload_time": "2018-10-04T09:56:09", "url": "https://files.pythonhosted.org/packages/23/95/64db706cb1f30015b1b625026a95102184ee9790ecc8d1080340c6d99d78/django_validation_report-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e5efa407a13330899e4613e475a09294", "sha256": "39029c31e1daf611a5c80e1fd43b46fb58c3a59f39c36ba92816bb869d94d799" }, "downloads": -1, "filename": "django-validation-report-1.0.3.tar.gz", "has_sig": false, "md5_digest": "e5efa407a13330899e4613e475a09294", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6411, "upload_time": "2018-10-04T09:56:10", "url": "https://files.pythonhosted.org/packages/28/b9/aa36e19f9b22ae1f870be89ed54c79af83413dcd2c46e09490b5acc98706/django-validation-report-1.0.3.tar.gz" } ] }