{ "info": { "author": "Pablo Martin", "author_email": "goinnn@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "django-multiselectfield\n=======================\n\n.. image:: https://travis-ci.org/goinnn/django-multiselectfield.png?branch=master\n :target: https://travis-ci.org/goinnn/django-multiselectfield\n\n.. image:: https://coveralls.io/repos/goinnn/django-multiselectfield/badge.png?branch=master\n :target: https://coveralls.io/r/goinnn/django-multiselectfield\n\n.. image:: https://badge.fury.io/py/django-multiselectfield.png\n :target: https://badge.fury.io/py/django-multiselectfield\n\nA new model field and form field. With this you can get a multiple select from a choices. Stores to the database as a CharField of comma-separated values.\n\nThis egg is inspired by this `snippet `_.\n\nSupported Python versions: 2.7, 3.4+\n\nSupported Django versions: 1.4-2.0+\n\nInstallation\n============\n\n\nInstall with pip\n----------------\n\n.. code-block:: bash\n\n $ pip install django-multiselectfield\n\nConfigure your models.py\n------------------------\n\n.. code-block:: python\n\n from multiselectfield import MultiSelectField\n\n # ...\n\n MY_CHOICES = (('item_key1', 'Item title 1.1'),\n ('item_key2', 'Item title 1.2'),\n ('item_key3', 'Item title 1.3'),\n ('item_key4', 'Item title 1.4'),\n ('item_key5', 'Item title 1.5'))\n\n MY_CHOICES2 = ((1, 'Item title 2.1'),\n (2, 'Item title 2.2'),\n (3, 'Item title 2.3'),\n (4, 'Item title 2.4'),\n (5, 'Item title 2.5'))\n\n class MyModel(models.Model):\n\n # .....\n\n my_field = MultiSelectField(choices=MY_CHOICES)\n my_field2 = MultiSelectField(choices=MY_CHOICES2,\n max_choices=3,\n max_length=3)\n\n\nIn your settings.py\n-------------------\n\nOnly you need it, if you want the translation of django-multiselectfield\n\n.. code-block:: python\n\n INSTALLED_APPS = (\n 'django.contrib.auth',\n 'django.contrib.contenttypes',\n 'django.contrib.sessions',\n 'django.contrib.sites',\n 'django.contrib.admin',\n\n #.....................#\n\n 'multiselectfield',\n )\n\n\nCustomizing templates\n---------------------\n\nIt is possible to customize the HTML of this widget in your form template. To do so, you will need to loop through ``form.{field}.field.choices``. Here is an example that displays the field label underneath/after the checkbox for a ``MultiSelectField`` called ``providers``:\n\n.. code-block:: HTML+Django\n\n {% for value, text in form.providers.field.choices %}\n
\n \n \n
\n {% endfor %}\n\n\nDjango REST Framework\n---------------------\n\nDjango REST Framework comes with a ``MultipleChoiceField`` that works perfectly with this:\n\n.. code-block:: python\n\n from rest_framework import fields, serializers\n\n from myapp.models import MY_CHOICES, MY_CHOICES2\n\n class MyModelSerializer(serializers.HyperlinkedModelSerializer):\n # ...\n my_field = fields.MultipleChoiceField(choices=MY_CHOICES)\n my_field2 = fields.MultipleChoiceField(choices=MY_CHOICES2)\n # ...\n\n\nKnown Bugs and Limitations\n==========================\n\nAll tests pass on Django 1.4, 1.5, and 1.8+, so if you can, use a modern version of Django. However, if you must use Django 1.6 or 1.7 there are two known issues you will need to be aware of:\n\n1. `Named groups `_ do not render properly in Django 1.6. The workaround is to manually render the field in your form or use a custom widget. If your workaround is suitably generic, please submit a pull request with it.\n\n2. Only in Django 1.6 and 1.7, due to `Django bug #9619 `_, passing a MultiSelectField to ``values()`` or ``values_list()`` will return the database representation of the field (a string of comma-separated values). The workaround is to manually call ``.split(',')`` on the result.\n\n The Django bug was introduced in Django 1.6 and is fixed in Django 1.8 and onward, so ``values()`` and ``values_list()`` return a vanilla Python list of values for Django <= 1.5 and Django >= 1.8.\n\n See `issue #40 `_ for discussion about this bug.\n\n\nDevelopment\n===========\n\nYou can get the last bleeding edge version of django-multiselectfield by doing a clone\nof its git repository:\n\n.. code-block:: bash\n\n git clone https://github.com/goinnn/django-multiselectfield\n\n\nExample project\n===============\n\nThere is a fully configured example project in the `example directory `_. You can run it as usual:\n\n.. code-block:: bash\n\n python manage.py migrate # or python manage.py syncdb --noinput\n python manage.py loaddata app_data\n python manage.py runserver\n\n\n0.1.9 (2019-10-02)\n------------------\n\n* Added support for Django 2\n* Added support for Python 3.6\n* Drop support for Python (2.6, 3.3)\n* Thanks to:\n * `hirokinko `_\n\n0.1.6 (2017-05-10)\n------------------\n\n* Added support for Django 1.11\n* Added support for Python 3.6\n* Improved rendering in Django admin\n* Improved documentation\n* Thanks to:\n * `atten `_\n * `ixc `_\n * `LeilaniAnn `_\n\n0.1.5 (2017-01-02)\n------------------\n\n* Added support for Django 1.8-1.10\n* Added support for named groups in choices\n* Added support for min_choices argument\n* Various fixes\n* More tests\n* Thanks to:\n * `danilogbotelho `_\n * `dmitry-krasilnikov `_\n * `Kamil D\u0119bowski `_\n\n0.1.4 (2016-02-23)\n------------------\n\n* Fixed warning about SubfieldBase\n* Added support for Django 1.8+\n* Added support for named groups\n* We now play nice with django-dynamic-fixture\n* More tests\n\n0.1.3 (2014-10-13)\n------------------\n\n* Support to Django 1.7 (I'm sorry to the delay)\n* Adding get_FIELD_list function\n* Fix an error when a MultiSelectField was reandonly at the admin site\n* Thanks to:\n * `Hernil `_\n * `Vasyl Stanislavchuk `_\n * `Litchfield `_\n * `Chris-erickson `_\n\n0.1.2 (2014-04-04)\n------------------\n\n* Include the spanish translations to the pypi egg\n* Improvements in the readme file\n* Windows OS compatibility\n* Thanks to:\n * `StillNewb `_\n * `Diego Yungh `_\n\n0.1.1 (2013-12-04)\n------------------\n* Move the multiselectfield app to parent folder\n* Details\n\n0.1.0 (2013-11-30)\n------------------\n\n* Test/example project\n* Now works if the first composant of the list of tuple is an integer\n* Now max_length is not required, the Multiselect field calculate it automatically.\n* The max_choices attr can be a attr in the model field\n* Refactor the code\n* Spanish translations\n* Support to python2.6\n* Thanks to:\n * `Daniele Procida `_\n\n0.0.3 (2013-09-11)\n------------------\n\n* Python 3 compatible\n* Fix an error, the snippet had another error when the choices were translatables\n* Improvements in the README file\n\n\n0.0.2 (2012-09-28)\n------------------\n\n* Fix an error, the snippet had an error.\n\n0.0.1 (2012-09-27)\n------------------\n\n* Initial version from the next `snippet `_\n\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/goinnn/django-multiselectfield", "keywords": "django,multiple,select,field,choices", "license": "LGPL 3", "maintainer": "", "maintainer_email": "", "name": "django-multiselectfield", "package_url": "https://pypi.org/project/django-multiselectfield/", "platform": "", "project_url": "https://pypi.org/project/django-multiselectfield/", "project_urls": { "Homepage": "https://github.com/goinnn/django-multiselectfield" }, "release_url": "https://pypi.org/project/django-multiselectfield/0.1.9/", "requires_dist": [ "django (>=1.4)" ], "requires_python": "", "summary": "Django multiple select field", "version": "0.1.9" }, "last_serial": 5927641, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "9ea690d12a6ca1ae63798d45ca9d8209", "sha256": "b33a5a5b1383cb486f53c4ff1415ba2870ddb163a2c9dec44ecfdd193044da48" }, "downloads": -1, "filename": "django-multiselectfield-0.0.1.tar.gz", "has_sig": false, "md5_digest": "9ea690d12a6ca1ae63798d45ca9d8209", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3145, "upload_time": "2012-09-27T14:18:18", "url": "https://files.pythonhosted.org/packages/c6/fa/e9c81ef31c675b8f9fba2cedc470f67b5210b339bbdc2a89e65d09e148ea/django-multiselectfield-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "4d08e78ae3238f520014c8ee7b15cf85", "sha256": "fa5297644a6ee628b4707412c488b1b83ed534f76aa1cc1d8c9247b83010ba75" }, "downloads": -1, "filename": "django-multiselectfield-0.0.2.tar.gz", "has_sig": false, "md5_digest": "4d08e78ae3238f520014c8ee7b15cf85", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3176, "upload_time": "2012-09-28T07:48:32", "url": "https://files.pythonhosted.org/packages/70/1a/648641aa57de41b3f9bf7190081784e63b3fbe1a677be33755788d36248f/django-multiselectfield-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "e2bd1c18d0f7dc682824754a4ebe023c", "sha256": "cd95f5e605378b87c47c80d5a5fbf900eef3a6a3128008bef67d6ca625b5a914" }, "downloads": -1, "filename": "django-multiselectfield-0.0.3.tar.gz", "has_sig": false, "md5_digest": "e2bd1c18d0f7dc682824754a4ebe023c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6785, "upload_time": "2013-09-11T08:53:06", "url": "https://files.pythonhosted.org/packages/75/d4/9b26fd7561284d1af555779a7ac6c39250a40d2f6a365b87f7e67a6e26e9/django-multiselectfield-0.0.3.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "1bf299e658916a32193f5483c0ea7f21", "sha256": "852a1600566843c6a22a4fa654edcafb6fbe4765874f1c76b501338f542cffc8" }, "downloads": -1, "filename": "django-multiselectfield-0.1.0.tar.gz", "has_sig": false, "md5_digest": "1bf299e658916a32193f5483c0ea7f21", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7946, "upload_time": "2013-11-30T19:21:13", "url": "https://files.pythonhosted.org/packages/98/1b/8b5ad708073e1b3fb4f5eb3a063a9050506b9cbc22d4ee846ba48aefd272/django-multiselectfield-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "fc647c9640aa41ccc16a7833f83b384e", "sha256": "8e8b79a61bb4d548ceade49ebcb0931488f31845c6270a344f761ca46407747d" }, "downloads": -1, "filename": "django-multiselectfield-0.1.1.tar.gz", "has_sig": false, "md5_digest": "fc647c9640aa41ccc16a7833f83b384e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7643, "upload_time": "2013-12-04T16:16:24", "url": "https://files.pythonhosted.org/packages/b1/78/49f51274673dbbd33afa130670850d375f419a45689e1ad3ae289eb0f99b/django-multiselectfield-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "b2e0096fa4c8287f244d7ca2f69c5ff2", "sha256": "0afcd69380b37a06469774d2a8a31fe588e32497c234384e6b6419eea37c7b50" }, "downloads": -1, "filename": "django-multiselectfield-0.1.2.tar.gz", "has_sig": false, "md5_digest": "b2e0096fa4c8287f244d7ca2f69c5ff2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8382, "upload_time": "2014-04-04T07:50:09", "url": "https://files.pythonhosted.org/packages/96/c0/1c8b11eb408a781c9534884dbea9fac47ea9151850492c79180ec0af43d1/django-multiselectfield-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "3c8f789470a8bebf81a0101a9ef56752", "sha256": "3b7e950323d477e40660d737bf79777d9122c3962a55af5bd60819e40472fc6c" }, "downloads": -1, "filename": "django-multiselectfield-0.1.3.tar.gz", "has_sig": false, "md5_digest": "3c8f789470a8bebf81a0101a9ef56752", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8669, "upload_time": "2014-10-13T15:25:23", "url": "https://files.pythonhosted.org/packages/46/fb/374a011657deee85db77df745ee921b74ca120c6161369d761e24c7cfaaf/django-multiselectfield-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "f51c5209ee05d3beb305734313b3e85a", "sha256": "df79c2e2513abc7581a3191e9b6cf5856dd513d784aa0c115e94450eb8c32617" }, "downloads": -1, "filename": "django-multiselectfield-0.1.4.tar.gz", "has_sig": false, "md5_digest": "f51c5209ee05d3beb305734313b3e85a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11728, "upload_time": "2016-09-23T14:14:34", "url": "https://files.pythonhosted.org/packages/fb/0d/735fcbf9724b906afa557900dc9535205015db74cf3cb5eb4180ab221d88/django-multiselectfield-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "42926c31f7506971f846614be1a7014c", "sha256": "a3735a95e2c3b6fde0910913cb32a9b4d368063c2a93b4c93fec7734dbf5a237" }, "downloads": -1, "filename": "django-multiselectfield-0.1.5.tar.gz", "has_sig": false, "md5_digest": "42926c31f7506971f846614be1a7014c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11853, "upload_time": "2017-01-02T08:01:23", "url": "https://files.pythonhosted.org/packages/07/d0/660efdeaa53521e0d6b9d847a41c99ea433c227cff93ac2f27703cbf605b/django-multiselectfield-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "268a3f5a4b1990ce03c47804a39ad568", "sha256": "0be671957cf3b04b8b07596b1aa0c6b3fdf0d47d821b94a8d32be90f112b6c1e" }, "downloads": -1, "filename": "django-multiselectfield-0.1.6.tar.gz", "has_sig": true, "md5_digest": "268a3f5a4b1990ce03c47804a39ad568", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13649, "upload_time": "2017-05-10T11:04:26", "url": "https://files.pythonhosted.org/packages/b8/19/a3db6f950db1c5c11a897c4b1850bd9bdf4236528df89fceb95bec496fe3/django-multiselectfield-0.1.6.tar.gz" } ], "0.1.6.dev1": [ { "comment_text": "", "digests": { "md5": "9f2a5ed860573bec85b0752d9b327159", "sha256": "e9571854c3bde6c75584639f84b2ed817547054014386c8374bc099428f673d5" }, "downloads": -1, "filename": "django_multiselectfield-0.1.6.dev1-py3-none-any.whl", "has_sig": true, "md5_digest": "9f2a5ed860573bec85b0752d9b327159", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15136, "upload_time": "2017-03-08T09:03:41", "url": "https://files.pythonhosted.org/packages/0e/43/0c1713874707e9b0d75205433366d103a0d2e28fbb4cdf38b71af304f366/django_multiselectfield-0.1.6.dev1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5d572432456a94d9ff4b26ea5be0e4c1", "sha256": "55b7b1d8d1bd9f8fc4411225267827abf94b51f76246126039aed63e81dec913" }, "downloads": -1, "filename": "django-multiselectfield-0.1.6.dev1.tar.gz", "has_sig": true, "md5_digest": "5d572432456a94d9ff4b26ea5be0e4c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13308, "upload_time": "2017-03-08T09:03:44", "url": "https://files.pythonhosted.org/packages/54/7d/459c527f2e2527b2e17dfd4dc2034a1c5873652f34795bf065516fe1dd3c/django-multiselectfield-0.1.6.dev1.tar.gz" } ], "0.1.6.dev2": [ { "comment_text": "", "digests": { "md5": "78aace03ac3df64a9d63f6fe42729c87", "sha256": "25b2bd86b74bbed248c3d6680e7e829cb9ea1e562fad11817b7cd3f933f1b56f" }, "downloads": -1, "filename": "django-multiselectfield-0.1.6.dev2.tar.gz", "has_sig": true, "md5_digest": "78aace03ac3df64a9d63f6fe42729c87", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13301, "upload_time": "2017-05-10T10:01:08", "url": "https://files.pythonhosted.org/packages/e5/42/e10af0fab6f86258a8b7dfe2d4cce996ac7608f0ec3fbe464a9421d5e391/django-multiselectfield-0.1.6.dev2.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "9f12e4b990456a81ac595fe09c34cbe1", "sha256": "8b3277e184fe9308c139c632ccf0ced025160724fb690e45a1c39de97a81f47d" }, "downloads": -1, "filename": "django-multiselectfield-0.1.7.tar.gz", "has_sig": true, "md5_digest": "9f12e4b990456a81ac595fe09c34cbe1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13697, "upload_time": "2017-05-18T13:04:47", "url": "https://files.pythonhosted.org/packages/65/59/1d5499672f8589fd997fdebf76ab4e9b63206d7ee4eb501875470007af3b/django-multiselectfield-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "f08a638e8a8e0a1ee0b8cf53b2eb3f2a", "sha256": "52483d23aecbf6b502f9e6806e97da9288d5d7f2a3f99f736390763de68c8fd7" }, "downloads": -1, "filename": "django-multiselectfield-0.1.8.tar.gz", "has_sig": true, "md5_digest": "f08a638e8a8e0a1ee0b8cf53b2eb3f2a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13722, "upload_time": "2017-08-08T06:20:05", "url": "https://files.pythonhosted.org/packages/c4/39/792bb001beb9cfd7f8dc5d88edb80963de0ae281b77be79038c0fe50582b/django-multiselectfield-0.1.8.tar.gz" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "a663d9c9b05ad683efb73689057472a4", "sha256": "439cea0af1c32ab141ce6499cf802a79677626798fe564d00e2dd67be146684e" }, "downloads": -1, "filename": "django_multiselectfield-0.1.9-py2-none-any.whl", "has_sig": false, "md5_digest": "a663d9c9b05ad683efb73689057472a4", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 15279, "upload_time": "2019-10-04T09:59:38", "url": "https://files.pythonhosted.org/packages/c1/d2/8969e95184737c991c83df72aed57cc7a4537299fa8cc015e7fc27e39fa5/django_multiselectfield-0.1.9-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fee23e944755e17bcf74aa5dc81f820b", "sha256": "54fa3886884cbc5d9c2f523e0e4af2cc3b976bd077718b2b443a5be44eb481ec" }, "downloads": -1, "filename": "django-multiselectfield-0.1.9.tar.gz", "has_sig": false, "md5_digest": "fee23e944755e17bcf74aa5dc81f820b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13790, "upload_time": "2019-10-04T09:59:40", "url": "https://files.pythonhosted.org/packages/9e/1d/de057c2fcf1ec880025cdf258b4b8ad346af5d8a5155273f15f4c1f5536e/django-multiselectfield-0.1.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a663d9c9b05ad683efb73689057472a4", "sha256": "439cea0af1c32ab141ce6499cf802a79677626798fe564d00e2dd67be146684e" }, "downloads": -1, "filename": "django_multiselectfield-0.1.9-py2-none-any.whl", "has_sig": false, "md5_digest": "a663d9c9b05ad683efb73689057472a4", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 15279, "upload_time": "2019-10-04T09:59:38", "url": "https://files.pythonhosted.org/packages/c1/d2/8969e95184737c991c83df72aed57cc7a4537299fa8cc015e7fc27e39fa5/django_multiselectfield-0.1.9-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fee23e944755e17bcf74aa5dc81f820b", "sha256": "54fa3886884cbc5d9c2f523e0e4af2cc3b976bd077718b2b443a5be44eb481ec" }, "downloads": -1, "filename": "django-multiselectfield-0.1.9.tar.gz", "has_sig": false, "md5_digest": "fee23e944755e17bcf74aa5dc81f820b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13790, "upload_time": "2019-10-04T09:59:40", "url": "https://files.pythonhosted.org/packages/9e/1d/de057c2fcf1ec880025cdf258b4b8ad346af5d8a5155273f15f4c1f5536e/django-multiselectfield-0.1.9.tar.gz" } ] }