Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django 3 support #39

Merged
merged 6 commits into from
Dec 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ Development sponsored by [Midwest Communications](http://mwcradio.com/) and [Mas

#### Supported Django and Python versions

Django \ Python | 2.7 | 3.4 | 3.5 | 3.6
--------------- | --- | --- | --- | ---
1.11 | * | * | * | *
2.0 | | * | * | *
Django \ Python | 2.7 | 3.4 | 3.5 | 3.6 |
--------------- | --- | --- | --- | --- |
1.11 | * | * | * | * |
2.0 | | * | * | * |
3.1 | | | | * |


## Documentation
Expand Down Expand Up @@ -489,6 +490,9 @@ defined in settings.py and ship some sane defaults.
### Unreleased
_TBD_

### 2.0.1
* Add support for Django 3.1

### 2.0.0
* Add the ability to remap `MULTIPLE_TEXT` answers
* Introduce `FORMLY_TEST_ARGS` pattern to run a restricted version of the test suite
Expand Down
2 changes: 1 addition & 1 deletion formly/forms/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class MultiTextWidget(MultiWidget):
def __init__(self, widgets_length, **kwargs):
widgets = (TextInput() for _ in range(widgets_length))
widgets = [TextInput() for _ in range(widgets_length)]
kwargs.update({"widgets": widgets})
super(MultiTextWidget, self).__init__(**kwargs)

Expand Down
7 changes: 6 additions & 1 deletion formly/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
from django.template.defaultfilters import slugify
from django.urls import reverse
from django.utils import timezone
from django.utils.encoding import python_2_unicode_compatible
try:
# Django <= 2.x
from django.utils.encoding import python_2_unicode_compatible
except ImportError:
# Django >= 3.x
from six import python_2_unicode_compatible

from jsonfield import JSONField

Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import find_packages, setup

VERSION = "2.0.0"
VERSION = "2.0.1-rc1"
LONG_DESCRIPTION = """

======
Expand Down Expand Up @@ -46,6 +46,8 @@
+-----------------+-----+-----+-----+-----+
| 2.0 | | * | * | * |
+-----------------+-----+-----+-----+-----+
| 3.1 | | | | * |
+-----------------+-----+-----+-----+-----+


.. _Midwest Communications: http://mwcradio.com/
Expand All @@ -71,12 +73,10 @@
"Framework :: Django",
"Framework :: Django :: 1.11",
"Framework :: Django :: 2.0",
"Framework :: Django :: 3.1",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Framework :: Django",
"Framework :: Django :: 1.11",
"Framework :: Django :: 2.0",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
Expand Down