{ "info": { "author": "hipo", "author_email": "pypi@hipolabs.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "DRF-EXTRA-FIELDS\n================\n\nExtra Fields for Django Rest Framework\n\n![https://travis-ci.org/Hipo/drf-extra-fields.svg?branch=master](https://travis-ci.org/Hipo/drf-extra-fields.svg?branch=master)\n\nUsage\n================\n \ninstall the package\n \n```bash\npip install django-extra-fields\n```\n\n**Note:** \n- Install version 0.1 for Django Rest Framework 2.*\n- Install version 0.3 for Django Rest Framework 3.*\n\n\nFields:\n----------------\n\n\n## Base64ImageField\n\nAn image representation for Base64ImageField\n\nIntherited by `ImageField`\n\n\n**Signature:** `Base64ImageField()`\n\n - It takes a base64 image as a string.\n - a base64 image: `data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7`\n - Base64ImageField accepts only the part after base64, `R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7`\n \n\n**Example:**\n \n```python\n# serializer\n\nfrom drf_extra_fields.fields import Base64ImageField\n\nclass UploadedBase64ImageSerializer(serializers.Serializer):\n file = Base64ImageField(required=False)\n created = serializers.DateTimeField()\n\n# use the serializer\nfile = 'R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='\nserializer = UploadedBase64ImageSerializer(data={'created': now, 'file': file})\n```\n \n \n## PointField\n\nPoint field for GeoDjango\n\n\n**Signature:** `PointField()`\n\n - It takes a dictionary contains latitude and longitude keys like below\n\n {\n \"latitude\": 49.8782482189424,\n \"longitude\": 24.452545489\n }\n \n**Example:**\n\n```python\n# serializer\n\nfrom drf_extra_fields.geo_fields import PointField\n\nclass PointFieldSerializer(serializers.Serializer):\n point = PointField(required=False)\n created = serializers.DateTimeField()\n\n# use the serializer\npoint = {\n \"latitude\": 49.8782482189424,\n \"longitude\": 24.452545489\n }\nserializer = PointFieldSerializer(data={'created': now, 'point': point})\n```\n\nCONTRIBUTION\n=================\n\n*TESTS*\n- Make sure that you add the test for contributed field to test/test_fields.py\nand run with command before sending a pull request:\n\n```bash\n$ pip install tox # if not already installed\n$ tox\n```\n\n*README*\n- Make sure that you add the documentation for the field added to README.md\n\n\nLICENSE\n====================\n\nCopyright DRF EXTRA FIELDS HIPO\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": null, "license": "License", "maintainer": null, "maintainer_email": null, "name": "django-extra-fields-lab", "package_url": "https://pypi.org/project/django-extra-fields-lab/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-extra-fields-lab/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/django-extra-fields-lab/0.3/", "requires_dist": null, "requires_python": null, "summary": "Additional fields for Django Rest Framework.", "version": "0.3" }, "last_serial": 1788996, "releases": { "0.3": [ { "comment_text": "", "digests": { "md5": "5836a83eb3265e0fafdfb1b8dee593f9", "sha256": "51dd636ada0d1c475469828f095a5bb4f023776cd2abb576c8e8355fdf583269" }, "downloads": -1, "filename": "django_extra_fields_lab-0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "5836a83eb3265e0fafdfb1b8dee593f9", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 20516, "upload_time": "2015-10-27T19:37:51", "url": "https://files.pythonhosted.org/packages/82/0e/79049bec454044e684619524b6a5f46a6b3ae86ac97f5d1b34551a05de6c/django_extra_fields_lab-0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "43225b2a885fae1d6f5f5bb8fc67e88b", "sha256": "37ef08c2fb6e01674b346066615096752b75b5be4bde6937e214f22bec7ed0f4" }, "downloads": -1, "filename": "django-extra-fields-lab-0.3.tar.gz", "has_sig": false, "md5_digest": "43225b2a885fae1d6f5f5bb8fc67e88b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6482, "upload_time": "2015-10-27T19:37:46", "url": "https://files.pythonhosted.org/packages/a3/2b/68d246669d9747c884ed842c5df74d18dd31b42ebd99501aa7905f52d5a7/django-extra-fields-lab-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5836a83eb3265e0fafdfb1b8dee593f9", "sha256": "51dd636ada0d1c475469828f095a5bb4f023776cd2abb576c8e8355fdf583269" }, "downloads": -1, "filename": "django_extra_fields_lab-0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "5836a83eb3265e0fafdfb1b8dee593f9", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 20516, "upload_time": "2015-10-27T19:37:51", "url": "https://files.pythonhosted.org/packages/82/0e/79049bec454044e684619524b6a5f46a6b3ae86ac97f5d1b34551a05de6c/django_extra_fields_lab-0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "43225b2a885fae1d6f5f5bb8fc67e88b", "sha256": "37ef08c2fb6e01674b346066615096752b75b5be4bde6937e214f22bec7ed0f4" }, "downloads": -1, "filename": "django-extra-fields-lab-0.3.tar.gz", "has_sig": false, "md5_digest": "43225b2a885fae1d6f5f5bb8fc67e88b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6482, "upload_time": "2015-10-27T19:37:46", "url": "https://files.pythonhosted.org/packages/a3/2b/68d246669d9747c884ed842c5df74d18dd31b42ebd99501aa7905f52d5a7/django-extra-fields-lab-0.3.tar.gz" } ] }