diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
index 08ad630..67f11a8 100644
--- a/.github/workflows/tests.yaml
+++ b/.github/workflows/tests.yaml
@@ -10,7 +10,7 @@ jobs:
strategy:
# all supported django version on lowest/highest supported python
# see https://www.djangoproject.com/download/#supported-versions
- # and https://docs.djangoproject.com/en/4.2/faq/install/#what-python-version-can-i-use-with-django
+ # and https://docs.djangoproject.com/en/5.0/faq/install/#what-python-version-can-i-use-with-django
matrix:
include:
- { django: "4.2", python: "3.8" }
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 731afc8..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,134 +0,0 @@
-language: python
-
-python:
- - "2.7"
- - "3.4"
- - "3.5"
- - "3.6"
- - "3.7"
- - "3.8"
-env:
- - DJANGO_VERSION='Django>=1.4,<1.5'
- - DJANGO_VERSION='Django>=1.5,<1.6'
- - DJANGO_VERSION='Django>=1.6,<1.7'
- - DJANGO_VERSION='Django>=1.7,<1.8'
- - DJANGO_VERSION='Django>=1.8,<1.9'
- - DJANGO_VERSION='Django>=1.9,<1.10'
- - DJANGO_VERSION='Django>=1.10,<1.11'
- - DJANGO_VERSION='Django>=1.11,<2.0'
- - DJANGO_VERSION='Django>=2.0,<2.1'
- - DJANGO_VERSION='Django>=2.1,<2.2'
- - DJANGO_VERSION='Django>=2.2,<3.0'
- - DJANGO_VERSION='Django>=3.0'
- - DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz'
-matrix:
- exclude:
- - python: "2.7"
- env: DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz'
- - python: "2.7"
- env: DJANGO_VERSION='Django>=2.1,<2.2'
- - python: "2.7"
- env: DJANGO_VERSION='Django>=2.2,<3.0'
- - python: "2.7"
- env: DJANGO_VERSION='Django>=3.0'
- - python: "2.7"
- env: DJANGO_VERSION='Django>=2.0,<2.1'
- - python: "2.7"
- env: DJANGO_VERSION='Django>=1.6,<1.7'
- - python: "3.4"
- env: DJANGO_VERSION='Django>=1.4,<1.5'
- - python: "3.4"
- env: DJANGO_VERSION='Django>=1.5,<1.6'
- - python: "3.4"
- env: DJANGO_VERSION='Django>=1.6,<1.7'
- - python: "3.4"
- env: DJANGO_VERSION='Django>=2.1,<2.2'
- - python: "3.4"
- env: DJANGO_VERSION='Django>=2.2,<3.0'
- - python: "3.4"
- env: DJANGO_VERSION='Django>=3.0'
- - python: "3.4"
- env: DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz'
- - python: "3.5"
- env: DJANGO_VERSION='Django>=1.4,<1.5'
- - python: "3.5"
- env: DJANGO_VERSION='Django>=1.5,<1.6'
- - python: "3.5"
- env: DJANGO_VERSION='Django>=1.6,<1.7'
- - python: "3.5"
- env: DJANGO_VERSION='Django>=1.7,<1.8'
- - python: "3.5"
- env: DJANGO_VERSION='Django>=2.1,<2.2'
- - python: "3.5"
- env: DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz'
- - python: "3.5"
- env: DJANGO_VERSION='Django>=3.0'
- - python: "3.6"
- env: DJANGO_VERSION='Django>=1.4,<1.5'
- - python: "3.6"
- env: DJANGO_VERSION='Django>=1.5,<1.6'
- - python: "3.6"
- env: DJANGO_VERSION='Django>=1.6,<1.7'
- - python: "3.6"
- env: DJANGO_VERSION='Django>=1.7,<1.8'
- - python: "3.6"
- env: DJANGO_VERSION='Django>=1.8,<1.9'
- - python: "3.6"
- env: DJANGO_VERSION='Django>=1.9,<1.10'
- - python: "3.6"
- env: DJANGO_VERSION='Django>=1.10,<1.11'
- - python: "3.6"
- env: DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz'
- - python: "3.7"
- env: DJANGO_VERSION='Django>=1.4,<1.5'
- - python: "3.7"
- env: DJANGO_VERSION='Django>=1.5,<1.6'
- - python: "3.7"
- env: DJANGO_VERSION='Django>=1.6,<1.7'
- - python: "3.7"
- env: DJANGO_VERSION='Django>=1.7,<1.8'
- - python: "3.7"
- env: DJANGO_VERSION='Django>=1.8,<1.9'
- - python: "3.7"
- env: DJANGO_VERSION='Django>=1.9,<1.10'
- - python: "3.7"
- env: DJANGO_VERSION='Django>=1.10,<1.11'
- - python: "3.7"
- env: DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz'
- - python: "3.8"
- env: DJANGO_VERSION='Django>=1.4,<1.5'
- - python: "3.8"
- env: DJANGO_VERSION='Django>=1.5,<1.6'
- - python: "3.8"
- env: DJANGO_VERSION='Django>=1.6,<1.7'
- - python: "3.8"
- env: DJANGO_VERSION='Django>=1.7,<1.8'
- - python: "3.8"
- env: DJANGO_VERSION='Django>=1.8,<1.9'
- - python: "3.8"
- env: DJANGO_VERSION='Django>=1.9,<1.10'
- - python: "3.8"
- env: DJANGO_VERSION='Django>=1.10,<1.11'
- - python: "3.8"
- env: DJANGO_VERSION='Django>=2.0,<2.1'
- - python: "3.8"
- env: DJANGO_VERSION='Django>=2.1,<2.2'
-
-install:
- - pip install -q $DJANGO_VERSION
- - pip install tox coveralls flake8
-
-script:
- - coverage erase
- - if [[ $(python -c 'import sys; print("0" if sys.version_info < (2, 7) else "1")') == "1" ]]; then flake8 --ignore=E501,W605; fi
- - PYTHONPATH=. coverage run -p example/run_tests.py
- - PYTHONPATH=. coverage run -p example/run_tests.py example.settings_no_debug
-after_success:
- - coverage combine
- - coveralls
-
-notifications:
- email:
- - goinnn@gmail.com
- - blag@users.noreply.github.com
- - tomasgarzonhervas@gmail.com
diff --git a/README.rst b/README.rst
index 5eaa059..2677123 100644
--- a/README.rst
+++ b/README.rst
@@ -1,8 +1,8 @@
django-multiselectfield
=======================
-.. image:: https://travis-ci.org/goinnn/django-multiselectfield.png?branch=master
- :target: https://travis-ci.org/goinnn/django-multiselectfield
+.. image:: https://github.com/goinnn/django-multiselectfield/actions/workflows/tests.yaml/badge.svg
+ :target: https://github.com/goinnn/django-multiselectfield/actions/workflows/tests.yaml
.. image:: https://coveralls.io/repos/goinnn/django-multiselectfield/badge.png?branch=master
:target: https://coveralls.io/r/goinnn/django-multiselectfield
@@ -14,9 +14,9 @@ A new model field and form field. With this you can get a multiple select from a
This egg is inspired by this `snippet `_.
-Supported Python versions: 2.7, 3.4+
+Supported Python versions: 3.8+
-Supported Django versions: 1.4-2.0+
+Supported Django versions: 4.2+
Installation
============
@@ -116,15 +116,9 @@ Django REST Framework comes with a ``MultipleChoiceField`` that works perfectly
Known Bugs and Limitations
==========================
-All 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:
+1. As of 0.1.13 ``MultiSelectFormField`` requires a `flat_choices` attribute
-1. `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.
-
-2. 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.
-
- 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.
-
- See `issue #40 `_ for discussion about this bug.
+ See `issue #155 `_ for discussion about this bug.
Development
@@ -145,6 +139,6 @@ There is a fully configured example project in the `example directory
#
# This program is free software: you can redistribute it and/or modify
@@ -41,6 +40,7 @@ def read(*rnames):
'Development Status :: 4 - Beta',
'Framework :: Django',
'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)',
+ 'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
@@ -51,14 +51,8 @@ def read(*rnames):
url='https://github.com/goinnn/django-multiselectfield',
packages=find_packages(),
include_package_data=True,
- tests_require=[
- 'django>=1.4',
- 'tox',
- 'coverage',
- 'flake8',
- ],
install_requires=[
- 'django>=1.4',
+ 'django>=4.2',
],
zip_safe=False,
)
diff --git a/tox.ini b/tox.ini
index db8d4f5..89f9d57 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,17 +1,15 @@
[tox]
envlist =
- python{36,37,38,39,310}-django32,
- python{38,39,310}-django40,
- python{38,39,310,311}-django41,
python{38,39,310,311,312}-django42,
python{310,311,312}-django50
+ python{310,311,312}-django51
[testenv]
usedevelop = True
setenv =
PYTHONPATH=.
commands =
- python {envbindir}/flake8 --ignore=E501,W605
+ python {envbindir}/flake8 --ignore=E501
python {envbindir}/coverage run -p example/run_tests.py
python {envbindir}/coverage run -p example/run_tests.py example.settings_no_debug
install_command =
@@ -19,11 +17,6 @@ install_command =
deps =
coveralls
flake8
- pillow
- PyYAML
- django32: django~=3.2
- django40: django~=4.0
- django41: django~=4.1
django42: django~=4.2
django50: django~=5.0
django51: django>=5.1a1,<5.2