mirror of
https://github.com/Hopiu/django-fobi.git
synced 2026-04-24 06:54:43 +00:00
Seems to work with Django 3.0
This commit is contained in:
parent
0b41cff8a6
commit
a75efdbe3b
6 changed files with 18 additions and 27 deletions
|
|
@ -19,8 +19,15 @@ are used for versioning (schema follows below):
|
|||
----
|
||||
2020-01-xx (not yet released)
|
||||
|
||||
.. note::
|
||||
|
||||
This release drops support for Python 2.7 and 3.4 and sets the minimum
|
||||
requirement version for Django to 1.11. If you don't meet these
|
||||
requirements - do not upgrade.
|
||||
|
||||
- Drop support Django 1.8, 1.9, 1.10. Minimal supported Django version is 1.11.
|
||||
- Add support for Django 3.0.
|
||||
- Drop Python 2.7 support.
|
||||
- Drop Python 3.4 support.
|
||||
|
||||
0.15
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ handling the submitted form data).
|
|||
Prerequisites
|
||||
=============
|
||||
- Django 1.11, 2.0, 2.1, 2.2 and 3.0.
|
||||
- Python 2.7, 3.5, 3.6, 3.7 and 3.8.
|
||||
- Python 3.5, 3.6, 3.7 and 3.8.
|
||||
|
||||
Key concepts
|
||||
============
|
||||
|
|
|
|||
|
|
@ -150,15 +150,12 @@ if getattr(settings, 'ENABLE_CAPTCHA', False):
|
|||
except ImportError:
|
||||
pass
|
||||
|
||||
if getattr(settings, 'DEBUG', False) and \
|
||||
getattr(settings, 'DEBUG_TOOLBAR', False):
|
||||
if (
|
||||
getattr(settings, 'DEBUG', False)
|
||||
and getattr(settings, 'DEBUG_TOOLBAR', False)
|
||||
):
|
||||
import debug_toolbar
|
||||
|
||||
if versions.DJANGO_GTE_2_2:
|
||||
urlpatterns = [
|
||||
url(r'^__debug__/', debug_toolbar.urls),
|
||||
] + urlpatterns
|
||||
else:
|
||||
urlpatterns = [
|
||||
url(r'^__debug__/', include(debug_toolbar.urls)),
|
||||
] + urlpatterns
|
||||
urlpatterns = [
|
||||
url(r'^__debug__/', include(debug_toolbar.urls)),
|
||||
] + urlpatterns
|
||||
|
|
|
|||
13
setup.py
13
setup.py
|
|
@ -6,13 +6,6 @@ from setuptools import setup, find_packages
|
|||
|
||||
version = '0.16'
|
||||
|
||||
# ***************************************************************************
|
||||
# ************************** Python version *********************************
|
||||
# ***************************************************************************
|
||||
PY2 = sys.version_info[0] == 2
|
||||
PY3 = sys.version_info[0] == 3
|
||||
PYPY = hasattr(sys, 'pypy_translation_info')
|
||||
|
||||
# ***************************************************************************
|
||||
# ************************** Django version *********************************
|
||||
# ***************************************************************************
|
||||
|
|
@ -251,12 +244,9 @@ install_requires = [
|
|||
'Unidecode>=0.04.1',
|
||||
'vishap>=0.1.5,<2.0',
|
||||
'easy-thumbnails>=2.4.1',
|
||||
'simplejson>=3.0.0;python_version>"3.4"',
|
||||
'simplejson>=2.1.0,<=3.8.0;python_version<"3"',
|
||||
'simplejson>=3.0.0',
|
||||
]
|
||||
|
||||
# There are also conditional PY3/PY2 requirements. Scroll down to see them.
|
||||
|
||||
tests_require = [
|
||||
'selenium',
|
||||
'Faker',
|
||||
|
|
@ -276,7 +266,6 @@ setup(
|
|||
"customisable, modular, user- and developer- friendly.",
|
||||
long_description="{0}{1}".format(readme, screenshots),
|
||||
classifiers=[
|
||||
"Programming Language :: Python :: 2.7",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.5",
|
||||
"Programming Language :: Python :: 3.6",
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ from django.core.exceptions import ValidationError as DjangoValidationError
|
|||
from django.utils.functional import cached_property
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from rest_framework.compat import unicode_to_repr
|
||||
from rest_framework.exceptions import ErrorDetail, ValidationError
|
||||
from rest_framework.fields import (
|
||||
empty,
|
||||
|
|
@ -448,8 +447,7 @@ def assemble_serializer_class(form_entry,
|
|||
return attrs
|
||||
|
||||
def __repr__(self):
|
||||
return unicode_to_repr(
|
||||
representation.serializer_repr(self, indent=1))
|
||||
representation.serializer_repr(self, indent=1)
|
||||
|
||||
# The following are used for accessing `BoundField` instances on the
|
||||
# serializer, for the purposes of presenting a form-like API onto the
|
||||
|
|
|
|||
|
|
@ -15,6 +15,6 @@ fobi_router = DefaultRouter()
|
|||
fobi_router.register(
|
||||
r'fobi-form-entry',
|
||||
FobiFormEntryViewSet,
|
||||
base_name='fobi_form_entry'
|
||||
basename='fobi_form_entry'
|
||||
)
|
||||
urlpatterns = fobi_router.urls
|
||||
|
|
|
|||
Loading…
Reference in a new issue