{ "info": { "author": "Daniel Schep", "author_email": "dschep@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.0", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4" ], "description": "# Mutually Exclusive Form Fields\n[![Build Status](https://travis-ci.org/dschep/django-xor-formfields.svg?branch=master)](https://travis-ci.org/dschep/django-xor-formfields)\n\nEasily add mutually exclusive fields to Django forms.\n## Install\n### PyPI\n```\npip install django-xor-formfields\n```\n\n### Source\n```\npython setup.py install\n```\n\n## Example mutually exclusive form field (TextInput & Select):\n```\n# with a widget inference\nMutuallyExclusiveValueField(\n fields=(forms.TypedChoiceField(choices=[(1,1), (2,2)], coerce=int),\n forms.IntegerField()))\n\n# manual widget creation (allows for the placeholder attr & other customization)\nMutuallyExclusiveValueField(\n fields=(forms.IntegerField(), forms.IntegerField()),\n widget=MutuallyExclusiveRadioWidget(widgets=[\n forms.Select(choices=[(1,1), (2,2)]),\n forms.TextInput(attrs={'placeholder': 'Enter a number'}),\n ]))\n```\n\n## Using FileOrUrlField\nThis library also includes a more complete field that inherits from\n`MutuallyExclusiveValueField` that allows users to upload files via an URL or a\nfile upload. The field accepts a `to` parameter accepting the following values:\n`None, 'url', 'file'`. This value causes the field to perform either no\nnormalization, normalizatoin to an url (by storing uploaded files as media) or\nto a file (by downloading urls to an `InMemoryUploadedFile`).\n### Example:\n```\nFileOrUrlField(None) # returns UploadedFile objects or URL based on user input\nFileOrUrlField(to='file') # always validates to an UploadedFile\nFileOrUrlField(to='url', upload_to='foobar') # always validates to an URL\n```\n#### AWS note:\nThe `FileOrUrlField` supports a they keyword argument `no_aws_qs` which\ndisables aws querystring authorization if using AWS via `django-storages`\n\n## Tests & coverage!\nto run the tests simply run:\n```\nDJANGO_SETTINGS_MODULE=xorformfields.test_settings django-admin.py test xorformfields\n```\n\nCoverage results are available here: https://dschep.github.io/django-xor-formfields/htmlcov/", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dschep/django-mutuallyexclusive-formfields", "keywords": "django development forms", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-xor-formfields", "package_url": "https://pypi.org/project/django-xor-formfields/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-xor-formfields/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/dschep/django-mutuallyexclusive-formfields" }, "release_url": "https://pypi.org/project/django-xor-formfields/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "Mutually Exclusive form field wigets for Django", "version": "0.1.0" }, "last_serial": 1583345, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "7c1faccd872de9a49b063e2461a70246", "sha256": "87811d808fbd899a1eb65fc0414ced97a33e31e98516b2e13e931cb9e7666014" }, "downloads": -1, "filename": "django-xor-formfields-0.0.2.tar.gz", "has_sig": false, "md5_digest": "7c1faccd872de9a49b063e2461a70246", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7110, "upload_time": "2014-10-20T20:56:23", "url": "https://files.pythonhosted.org/packages/e4/91/be6800d90852ea0a67402bc75ccc7155cc47c1ccacf25c14faa2e9dd78c2/django-xor-formfields-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "8fa49f89fb38f6b11b91eb5ae5ef1029", "sha256": "42010cb35c933791dcc5e3f470ad356408fb8f0adf5b808a98b47e42d921d355" }, "downloads": -1, "filename": "django-xor-formfields-0.0.3.tar.gz", "has_sig": false, "md5_digest": "8fa49f89fb38f6b11b91eb5ae5ef1029", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7521, "upload_time": "2014-10-27T23:03:30", "url": "https://files.pythonhosted.org/packages/12/00/04d82b74daf338f80cddbf34e831138afb400b5cdae66f90b77add16a558/django-xor-formfields-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "8737c092f2e19f2d2129d69ec8b4ab5e", "sha256": "67e0aeb3fc6c9d0ffbab5a0fd17852cd12e26633edb95a56932a1021239b7c0d" }, "downloads": -1, "filename": "django-xor-formfields-0.0.4.tar.gz", "has_sig": false, "md5_digest": "8737c092f2e19f2d2129d69ec8b4ab5e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7963, "upload_time": "2014-11-28T16:07:15", "url": "https://files.pythonhosted.org/packages/26/c2/fb37d17bf58d1690c6b13bc4206f74a30e3405724e587b39f4fb97885b72/django-xor-formfields-0.0.4.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "c04e213289e7fbd72dfc252176bbe1b6", "sha256": "259415366062ee3b790e7ac7ddbec7606c68e507d422fb565cf3d01aa3cf4e48" }, "downloads": -1, "filename": "django_xor_formfields-0.1.0-py2-none-any.whl", "has_sig": false, "md5_digest": "c04e213289e7fbd72dfc252176bbe1b6", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 11390, "upload_time": "2015-06-08T15:01:54", "url": "https://files.pythonhosted.org/packages/7a/8f/43b04a24b006689c04240d399decc46ce904e1a824cc9fc80bc236e19490/django_xor_formfields-0.1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b4b95a20caf88a6dd70d1745a8d99aba", "sha256": "43210e6f465e7f5e4433dba80311ab1e7cdb3044b8bc1dd621bfbe96c9d518fb" }, "downloads": -1, "filename": "django-xor-formfields-0.1.0.tar.gz", "has_sig": false, "md5_digest": "b4b95a20caf88a6dd70d1745a8d99aba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8809, "upload_time": "2015-06-08T15:01:51", "url": "https://files.pythonhosted.org/packages/14/a5/5467e0faf2f1a339ee2a43fa056aac1629209252e9140fb77fcae7f8dd00/django-xor-formfields-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c04e213289e7fbd72dfc252176bbe1b6", "sha256": "259415366062ee3b790e7ac7ddbec7606c68e507d422fb565cf3d01aa3cf4e48" }, "downloads": -1, "filename": "django_xor_formfields-0.1.0-py2-none-any.whl", "has_sig": false, "md5_digest": "c04e213289e7fbd72dfc252176bbe1b6", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 11390, "upload_time": "2015-06-08T15:01:54", "url": "https://files.pythonhosted.org/packages/7a/8f/43b04a24b006689c04240d399decc46ce904e1a824cc9fc80bc236e19490/django_xor_formfields-0.1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b4b95a20caf88a6dd70d1745a8d99aba", "sha256": "43210e6f465e7f5e4433dba80311ab1e7cdb3044b8bc1dd621bfbe96c9d518fb" }, "downloads": -1, "filename": "django-xor-formfields-0.1.0.tar.gz", "has_sig": false, "md5_digest": "b4b95a20caf88a6dd70d1745a8d99aba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8809, "upload_time": "2015-06-08T15:01:51", "url": "https://files.pythonhosted.org/packages/14/a5/5467e0faf2f1a339ee2a43fa056aac1629209252e9140fb77fcae7f8dd00/django-xor-formfields-0.1.0.tar.gz" } ] }