{ "info": { "author": "Stef Bastiaansen", "author_email": "stef@megasnort.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python" ], "description": "==================\nDjango UTF-8 Field\n==================\n\n.. image:: https://travis-ci.org/megasnort/django-utf8field.svg\n :target: https://travis-ci.org/megasnort/django-utf8field/\n :alt: Build status\n\nThis package was created because at my work, `Language and Translation Technology Team`_ at the University of Ghent, we often create demos on the web that allow the user to input and process text or files. These texts are then processed by other scripts that expect clean UTF-8-texts.\nThis library extends the Django FileField, CharField and TextField by checking if the content of a submitted file or text is clean. If not, it generates an error. Checks are executed for four byte long characters and NULL characters.\n\n\nRequirements\n------------\nDjango >= 1.8\n\n\nInstallation\n------------\n::\n\n pip install django-utf8field\n\n\nUsage\n-----\n\nAdd the app to your settings:\n\n::\n\n INSTALLED_APPS = (\n ...\n 'utf8field',\n ...\n\n\nFileField\n^^^^^^^^^\nCreate a model like you would do normally, but instead of using FileField you use UTF8FileField:\n\n::\n\n from django.db import models\n from utf8field.fields import UTF8FileField\n\n class YourModel(models.Model):\n title = models.CharField(max_length=255)\n created_on = models.DateTimeField(auto_add_on=True)\n text = models.UTF8FileField()\n\n\nYou also have the option to provide the option `max_content_length` to limit the number of characters in the file. If the content is longer an error will be displayed. If you want to enable `four_byte_detection` set the parameter to True.\n\n\n::\n\n text = models.UTF8FileField(max_content_length=1000, four_byte_detection=True)\n\n\n\nCharField\n^^^^^^^^^\nCreate a model like you would do normally, but instead of using CharField you use UTF8CharField. If you want to enable `four_byte_detection` set the parameter to True.\n\n::\n\n from django.db import models\n from utf8field.fields import UTF8CharField\n\n class YourModel(models.Model):\n title = models.CharField(max_length=255, four_byte_detection=True)\n created_on = models.DateTimeField(auto_add_on=True)\n text = models.UTF8CharField(max_length=1000)\n\n\nTextField\n^^^^^^^^^\nCreate a model like you would do normally, but instead of using TextField you use UTF8TextField. If you want to enable `four_byte_detection` set the parameter to True.\n\n::\n\n from django.db import models\n from utf8field.fields import UTF8TextField\n\n class YourModel(models.Model):\n title = models.CharField(max_length=255)\n created_on = models.DateTimeField(auto_add_on=True)\n text = models.UTF8TextField(four_byte_detection=True)\n\n\n\nDjango Rest Framework\n^^^^^^^^^^^^^^^^^^^^^\nThe necessary serializers and automatic mapping of fields is provided so you should not be doing anything yourself to get the texts or files validated when using a ModelSerializer.\n\n\nDevelopment\n-----------\nTo run the tests make sure Django, Django Rest Framework and coverage are installed (`pip install django djangorestframework coverage`) and execute\n\n::\n\n python manage.py test\n\n\nTo create extra translations, execute\n\n::\n\n pm makemessages --locale=nl --extension=py --ignore=dev_example --ignore=build\n\n\n... and modify the resulting `django.po` file in `utf8field/locale/nl/LC_MESSAGES`.\n\n\n\n.. _`Language and Translation Technology Team`: https://lt3.ugent.be\n\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/megasnort/django-utf8field/archive/v1.0.0.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/megasnort/django-utf8field", "keywords": "django utf-8", "license": "Apache", "maintainer": "", "maintainer_email": "", "name": "django-utf8field", "package_url": "https://pypi.org/project/django-utf8field/", "platform": "", "project_url": "https://pypi.org/project/django-utf8field/", "project_urls": { "Download": "https://github.com/megasnort/django-utf8field/archive/v1.0.0.tar.gz", "Homepage": "https://github.com/megasnort/django-utf8field" }, "release_url": "https://pypi.org/project/django-utf8field/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "Add UTF-8 Validation to Django FileFields, CharFields and TextFields", "version": "1.0.0" }, "last_serial": 3239362, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "7be763b96445e666a900a4bd5c5ecb1f", "sha256": "c6d3cd23491c777544bdabe8d094111ec77240148e354847824e6ff594980caf" }, "downloads": -1, "filename": "django-utf8field-0.0.1.tar.gz", "has_sig": false, "md5_digest": "7be763b96445e666a900a4bd5c5ecb1f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2129, "upload_time": "2017-08-17T07:11:22", "url": "https://files.pythonhosted.org/packages/b0/5c/d8dbf634ef429e067a123747d7b7a159aa7d71a607280d5e1229c67ff01b/django-utf8field-0.0.1.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "e3a76faf9a4cec1e62491b1833a8d1d8", "sha256": "468a1a0421e78306a745c0f46dc3f3c569a143eaf87e3d53e0be80ecc43d0659" }, "downloads": -1, "filename": "django_utf8field-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e3a76faf9a4cec1e62491b1833a8d1d8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4299, "upload_time": "2017-08-29T11:47:49", "url": "https://files.pythonhosted.org/packages/e8/18/2cf6cecf01577ec81129314a4fd33c76ed9ff7ff4a1beb92015573e7e7d2/django_utf8field-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b7272fe75b1c579ffec451c13478a315", "sha256": "06aba78a9765f9533369502a334962df21c51fb3726ff8d9f7035d6caa1e6e0f" }, "downloads": -1, "filename": "django-utf8field-0.1.0.tar.gz", "has_sig": false, "md5_digest": "b7272fe75b1c579ffec451c13478a315", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2307, "upload_time": "2017-08-29T11:27:21", "url": "https://files.pythonhosted.org/packages/fb/6a/2fd6a881e763ec3aed8acf5be670efa04e754b4705287417f3fd2004e997/django-utf8field-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "b813e93374787a7ca985c880f44a2857", "sha256": "3cd771d7dcce728ca6b3e39c7270fde09e8d33d26156dd1ded2b49c2acf1b1c1" }, "downloads": -1, "filename": "django_utf8field-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b813e93374787a7ca985c880f44a2857", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4909, "upload_time": "2017-09-05T14:44:08", "url": "https://files.pythonhosted.org/packages/f5/ac/97df0814e4cc12a41e0ff9a604ac902de0a68f43e4c1401f90e7b505c0a1/django_utf8field-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "16f79d327c609b7ed64149ef90191cbb", "sha256": "69a7f1a74c088fd7092421191729e02429ffa477d3744a0713919a9f51476d52" }, "downloads": -1, "filename": "django-utf8field-0.2.0.tar.gz", "has_sig": false, "md5_digest": "16f79d327c609b7ed64149ef90191cbb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2762, "upload_time": "2017-09-05T14:44:09", "url": "https://files.pythonhosted.org/packages/58/13/427295db798970598a8f2685673cdef0bc26bf539333d9be21905ef03e7a/django-utf8field-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "0e89109439e48270e990ef9dedbb608f", "sha256": "a1efce9ee6b5f73f969b15b730ad2f9559a4d3eb3e2d32aec4bb6161a87a7e41" }, "downloads": -1, "filename": "django_utf8field-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0e89109439e48270e990ef9dedbb608f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5206, "upload_time": "2017-09-11T10:22:29", "url": "https://files.pythonhosted.org/packages/ac/70/04d3f5caf03f7ade327b80aa9a7632b8a9436933e3fff7364e355ccd5482/django_utf8field-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fc012a97aca1c67df1913ab0a7187657", "sha256": "ae471bc09e3aefdd4953a3b66a68b4076459fa4f8bb51269b9ce683e0151217f" }, "downloads": -1, "filename": "django-utf8field-0.3.0.tar.gz", "has_sig": false, "md5_digest": "fc012a97aca1c67df1913ab0a7187657", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3013, "upload_time": "2017-09-11T10:22:32", "url": "https://files.pythonhosted.org/packages/d2/19/f2f4fe55cd901af8980f447ad2a9993acc60d0f77318518674f7f1c9208e/django-utf8field-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "2d8638eed30cd3fd7b24ab12c87d10ea", "sha256": "1dba7f7a2173a99aa688004da18efcc13c9f69e1e52e3c13ceb6f5dc766037d5" }, "downloads": -1, "filename": "django_utf8field-0.3.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2d8638eed30cd3fd7b24ab12c87d10ea", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5215, "upload_time": "2017-09-12T08:04:04", "url": "https://files.pythonhosted.org/packages/73/ae/4b603e7856e26ea76be04a03eb1c37806af35b61c9e2c6cf606e62e7b66c/django_utf8field-0.3.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d413101cbb9716569dc0640d39bfc33c", "sha256": "d0c3feac0f9cac1998b28b6398f084a4c7ce5e1167045859ed3a2d2ac37f5ce7" }, "downloads": -1, "filename": "django-utf8field-0.3.1.tar.gz", "has_sig": false, "md5_digest": "d413101cbb9716569dc0640d39bfc33c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3019, "upload_time": "2017-09-12T08:04:05", "url": "https://files.pythonhosted.org/packages/35/e3/16870d633fe2fb4001e57c6f75a82db61035b7f8cbcd22645e19064a5db2/django-utf8field-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "b0cb35f840f1b5f26416c31df60f28f1", "sha256": "66d87d9c1f6823966b87f33c3d2dcf11d008a14cdb43a21de13ebb619f7c5129" }, "downloads": -1, "filename": "django_utf8field-0.3.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b0cb35f840f1b5f26416c31df60f28f1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5504, "upload_time": "2017-09-12T08:54:40", "url": "https://files.pythonhosted.org/packages/80/2f/614fb9b7f6c806cab5e312ac8f9a22c9254354d708163aa9a8fdd3c67b0f/django_utf8field-0.3.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fa9ebee31f67ac053a35d573e5b08ef5", "sha256": "7826d62b9e8c3e7c5ecc4d91e8c657ee86aa212d9730be70b99c51afe0d58b8f" }, "downloads": -1, "filename": "django-utf8field-0.3.2.tar.gz", "has_sig": false, "md5_digest": "fa9ebee31f67ac053a35d573e5b08ef5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3181, "upload_time": "2017-09-12T08:54:43", "url": "https://files.pythonhosted.org/packages/57/e6/7627acd414cc90075aa0e453504ed3b541cb87d45176624f60d0407fc279/django-utf8field-0.3.2.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "aad0bf5c1bb94162d18a9b796fb1344f", "sha256": "db951e2136a445621f52e0c7bff1180d03928a42674abe48ffbb5d43986f5517" }, "downloads": -1, "filename": "django_utf8field-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "aad0bf5c1bb94162d18a9b796fb1344f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6666, "upload_time": "2017-09-12T14:15:33", "url": "https://files.pythonhosted.org/packages/88/be/69344b56513db40550beede311a103bd09956db68d241abdf165f8bc09e7/django_utf8field-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "abb3e045e12f7ab37cb3abef97453564", "sha256": "9e0c66f6628e7bc67b1b0c38b3bcf94b4759a7da62eac022b354043541d25544" }, "downloads": -1, "filename": "django-utf8field-0.4.0.tar.gz", "has_sig": false, "md5_digest": "abb3e045e12f7ab37cb3abef97453564", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3629, "upload_time": "2017-09-12T14:15:34", "url": "https://files.pythonhosted.org/packages/a0/05/821af516a584669e3a755025f8d1a12b949f7a5eb0db497751de0fb43756/django-utf8field-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "2e53f9d1acceee56b0b1d1a8d9c3e799", "sha256": "2da94691733d02b3f47166172cbe9a9a05999eaccc88dcb27d44c131aef75fa5" }, "downloads": -1, "filename": "django_utf8field-0.4.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2e53f9d1acceee56b0b1d1a8d9c3e799", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6763, "upload_time": "2017-09-14T10:23:05", "url": "https://files.pythonhosted.org/packages/be/c3/e7d84f61624bc99a7275ab45a0f2362e19fc6bfd1cb9151328df0ddb32c2/django_utf8field-0.4.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f0a1f62523b6adec06c4fa366eabdf2b", "sha256": "b78c459845dfc2bacce1e7d9c15d185b3e9bb74a5b4a637ffdfaa8b0d54ac440" }, "downloads": -1, "filename": "django-utf8field-0.4.1.tar.gz", "has_sig": false, "md5_digest": "f0a1f62523b6adec06c4fa366eabdf2b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3642, "upload_time": "2017-09-14T10:23:07", "url": "https://files.pythonhosted.org/packages/91/be/d36bf2628276a2c610b2495bab8fc2501b25f0d2bd825432ffb1682c9bb5/django-utf8field-0.4.1.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "9665c3b9d77eeeb980d58be70a04a6e4", "sha256": "01de6b36e7e3a576f2b11ea24bcdf903804464828d6a6b8a9e76d879c2b2041f" }, "downloads": -1, "filename": "django_utf8field-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9665c3b9d77eeeb980d58be70a04a6e4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7704, "upload_time": "2017-10-10T13:34:53", "url": "https://files.pythonhosted.org/packages/71/38/75bd38e6ba8eaa7a3c8d50336d2c29f8d0f5b81529207f4d8ab971a654a1/django_utf8field-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ae9547a6d0256ac7e319c2db36f01dab", "sha256": "a81e9b2c0c9615ecd31f7324513de8ed6a5b3a2f1f49b3f93cdd1931d29ae383" }, "downloads": -1, "filename": "django-utf8field-1.0.0.tar.gz", "has_sig": false, "md5_digest": "ae9547a6d0256ac7e319c2db36f01dab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4304, "upload_time": "2017-10-10T13:34:55", "url": "https://files.pythonhosted.org/packages/9b/1b/78e1e4ae49ef0ec874c03654a751753764513a101217812865a739d93af8/django-utf8field-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9665c3b9d77eeeb980d58be70a04a6e4", "sha256": "01de6b36e7e3a576f2b11ea24bcdf903804464828d6a6b8a9e76d879c2b2041f" }, "downloads": -1, "filename": "django_utf8field-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9665c3b9d77eeeb980d58be70a04a6e4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7704, "upload_time": "2017-10-10T13:34:53", "url": "https://files.pythonhosted.org/packages/71/38/75bd38e6ba8eaa7a3c8d50336d2c29f8d0f5b81529207f4d8ab971a654a1/django_utf8field-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ae9547a6d0256ac7e319c2db36f01dab", "sha256": "a81e9b2c0c9615ecd31f7324513de8ed6a5b3a2f1f49b3f93cdd1931d29ae383" }, "downloads": -1, "filename": "django-utf8field-1.0.0.tar.gz", "has_sig": false, "md5_digest": "ae9547a6d0256ac7e319c2db36f01dab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4304, "upload_time": "2017-10-10T13:34:55", "url": "https://files.pythonhosted.org/packages/9b/1b/78e1e4ae49ef0ec874c03654a751753764513a101217812865a739d93af8/django-utf8field-1.0.0.tar.gz" } ] }