diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e19575291..8f16bf9e4 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,6 +15,12 @@ are used for versioning (schema follows below): 0.3.4 to 0.4). - All backwards incompatible changes are mentioned in this document. +0.16.2 +------ +2020-04-03 + +- Conditional use of deprecated `admin_static` templatetag module. + 0.16.1 ------ 2020-03-18 diff --git a/docs/changelog.rst b/docs/changelog.rst index 9ef82356d..8f16bf9e4 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -15,6 +15,18 @@ are used for versioning (schema follows below): 0.3.4 to 0.4). - All backwards incompatible changes are mentioned in this document. +0.16.2 +------ +2020-04-03 + +- Conditional use of deprecated `admin_static` templatetag module. + +0.16.1 +------ +2020-03-18 + +- Fix the ``datetime`` is not JSON serializable error. + 0.16 ---- 2020-01-11 diff --git a/setup.py b/setup.py index 3f1e03142..ac44b52f2 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from distutils.version import LooseVersion from setuptools import setup, find_packages -version = '0.16.1' +version = '0.16.2' # *************************************************************************** # ************************** Django version ********************************* diff --git a/src/fobi/__init__.py b/src/fobi/__init__.py index 9671a3da4..ec863a9a4 100644 --- a/src/fobi/__init__.py +++ b/src/fobi/__init__.py @@ -1,7 +1,7 @@ __title__ = 'django-fobi' -__version__ = '0.16.1' +__version__ = '0.16.2' __author__ = 'Artur Barseghyan ' -__copyright__ = '2014-2019 Artur Barseghyan' +__copyright__ = '2014-2020 Artur Barseghyan' __license__ = 'GPL 2.0/LGPL 2.1' default_app_config = 'fobi.apps.Config' diff --git a/src/fobi/contrib/themes/djangocms_admin_style_theme/templates/djangocms_admin_style_theme/dashboard.html b/src/fobi/contrib/themes/djangocms_admin_style_theme/templates/djangocms_admin_style_theme/dashboard.html index e1ed5744c..d816f7b9f 100644 --- a/src/fobi/contrib/themes/djangocms_admin_style_theme/templates/djangocms_admin_style_theme/dashboard.html +++ b/src/fobi/contrib/themes/djangocms_admin_style_theme/templates/djangocms_admin_style_theme/dashboard.html @@ -1,6 +1,10 @@ {% extends fobi_theme.base_edit_template %} -{% load i18n admin_static %} +{% if VERSIONS.DJANGO_GTE_2_1 %} + {% load i18n static %} +{% else %} + {% load i18n admin_static %} +{% endif %} {% block page-title %}{% trans "Dashboard" %}{% endblock page-title %} diff --git a/src/fobi/contrib/themes/djangocms_admin_style_theme/templates/djangocms_admin_style_theme/edit_form_entry.html b/src/fobi/contrib/themes/djangocms_admin_style_theme/templates/djangocms_admin_style_theme/edit_form_entry.html index b479d0e3b..19c81b656 100644 --- a/src/fobi/contrib/themes/djangocms_admin_style_theme/templates/djangocms_admin_style_theme/edit_form_entry.html +++ b/src/fobi/contrib/themes/djangocms_admin_style_theme/templates/djangocms_admin_style_theme/edit_form_entry.html @@ -1,6 +1,10 @@ {% extends "fobi/generic/edit_form_entry.html" %} -{% load i18n admin_static %} +{% if VERSIONS.DJANGO_GTE_2_1 %} + {% load i18n static %} +{% else %} + {% load i18n admin_static %} +{% endif %} {% block stylesheets %} diff --git a/src/fobi/contrib/themes/djangocms_admin_style_theme/templates/djangocms_admin_style_theme/import_form_entry.html b/src/fobi/contrib/themes/djangocms_admin_style_theme/templates/djangocms_admin_style_theme/import_form_entry.html index 567046988..fc2b2ee19 100644 --- a/src/fobi/contrib/themes/djangocms_admin_style_theme/templates/djangocms_admin_style_theme/import_form_entry.html +++ b/src/fobi/contrib/themes/djangocms_admin_style_theme/templates/djangocms_admin_style_theme/import_form_entry.html @@ -1,6 +1,10 @@ {% extends "fobi/generic/import_form_entry.html" %} -{% load i18n admin_static %} +{% if VERSIONS.DJANGO_GTE_2_1 %} + {% load i18n static %} +{% else %} + {% load i18n admin_static %} +{% endif %} {% block stylesheets %} diff --git a/src/fobi/contrib/themes/simple/templates/simple/base_edit.html b/src/fobi/contrib/themes/simple/templates/simple/base_edit.html index 46be4f308..351f191f0 100644 --- a/src/fobi/contrib/themes/simple/templates/simple/base_edit.html +++ b/src/fobi/contrib/themes/simple/templates/simple/base_edit.html @@ -2,7 +2,7 @@ {% load static future_compat %} {% else %} {% load admin_static future_compat %} -{% endif %}{#% load firstof from future %#} +{% endif %} {% block page-title %}{% endblock page-title %} | {% block site-title %}{% endblock site-title %} diff --git a/src/fobi/contrib/themes/simple/templates/simple/dashboard.html b/src/fobi/contrib/themes/simple/templates/simple/dashboard.html index dfd01d8b5..0777972f7 100644 --- a/src/fobi/contrib/themes/simple/templates/simple/dashboard.html +++ b/src/fobi/contrib/themes/simple/templates/simple/dashboard.html @@ -2,13 +2,9 @@ {% if VERSIONS.DJANGO_GTE_2_1 %} {% load i18n static %} -{% else %} - {% if VERSIONS.DJANGO_GTE_2_1 %} - {% load i18n static %} {% else %} {% load i18n admin_static %} {% endif %} -{% endif %} {% block page-title %}{% trans "Dashboard" %}{% endblock page-title %} diff --git a/src/fobi/templates/fobi/admin/bulk_change_plugins.html b/src/fobi/templates/fobi/admin/bulk_change_plugins.html index 78ad06752..a6889869b 100644 --- a/src/fobi/templates/fobi/admin/bulk_change_plugins.html +++ b/src/fobi/templates/fobi/admin/bulk_change_plugins.html @@ -1,10 +1,9 @@ {% extends "admin/base_site.html" %} {% if VERSIONS.DJANGO_GTE_2_1 %} - {% load i18n l10n static %} + {% load i18n l10n static admin_urls %} {% else %} - {% load i18n l10n admin_static %} + {% load i18n l10n admin_static admin_urls %} {% endif %} -{% load admin_urls %} {% block title %}{% trans "Edit multiple objects" %} | {% trans 'Django site admin' %}{% endblock %} diff --git a/src/fobi/tests/data.py b/src/fobi/tests/data.py index edb77a58c..79a887e8e 100644 --- a/src/fobi/tests/data.py +++ b/src/fobi/tests/data.py @@ -592,6 +592,17 @@ '}' ) ), + # ( + # 'sample_decimal', + # ( + # DecimalInputPlugin.uid, + # '{' + # '"name": "sample_decimal", ' + # '"required": false, ' + # '"label": "Sample decimal"' + # '}' + # ) + # ), ( 'bio', ( @@ -636,7 +647,7 @@ # ), ]) -TEST_DYNAMIC_FORMS_DEFINITION_DATA_DRF = copy.copy( +TEST_DYNAMIC_FORMS_DEFINITION_DATA_DRF = copy.deepcopy( TEST_DYNAMIC_FORMS_DEFINITION_DATA ) TEST_DYNAMIC_FORMS_DEFINITION_DATA_DRF.pop('ignore_01') @@ -661,6 +672,11 @@ 'drivers_license': FAKER.pybool(), 'special_fields': FAKER.pystr(), 'number_of_children': FAKER.pyint(), + # 'sample_decimal': "%.5f" % FAKER.pydecimal( + # left_digits=3, + # right_digits=5, + # positive=True + # ), 'bio': FAKER.text(), # 'unicode_name': u'Անուն', } @@ -697,6 +713,12 @@ (u'required', False), (u'read_only', False), (u'label', u'Number of children')])), + # (u'sample_decimal', OrderedDict([(u'type', u'decimal'), + # (u'required', False), + # (u'read_only', False), + # (u'label', u'Sample decimal'), + # ('max_digits', 10), + # ('decimal_places', 5)])), (u'bio', OrderedDict([(u'type', u'string'), (u'required', True), # (u'max_length', None), diff --git a/src/fobi/tests/test_core.py b/src/fobi/tests/test_core.py index 52674c348..54956fdba 100644 --- a/src/fobi/tests/test_core.py +++ b/src/fobi/tests/test_core.py @@ -9,7 +9,7 @@ get_registered_form_element_plugins, get_registered_form_handler_plugins, get_registered_themes, - get_registered_form_callbacks + get_registered_form_callbacks, ) from fobi.models import FormEntry, FormWizardEntry from fobi.forms import FormEntryForm