From 93ddf7381cb26ac17ee6f6e52bd89e15de232a18 Mon Sep 17 00:00:00 2001 From: Artur Barseghyan Date: Thu, 20 Jun 2019 01:42:36 +0200 Subject: [PATCH] prepare 0.15 --- CHANGELOG.rst | 18 ++++++++++++++++++ docs/changelog.rst | 18 ++++++++++++++++++ docs/index.rst | 17 +++++++++++++++-- setup.py | 2 +- src/fobi/__init__.py | 2 +- 5 files changed, 53 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4a6cff0b5..cb9f8ecb2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,6 +15,24 @@ are used for versioning (schema follows below): 0.3.4 to 0.4). - All backwards incompatible changes are mentioned in this document. +0.15 +---- +2019-06-20 + +.. note:: + + Although this release does not contain major backwards incompatible + changes, some things you have had working in past might break. + +- The following settings + ``FOBI_FAIL_ON_ERRORS_IN_FORM_ELEMENT_PLUGINS``, + ``FOBI_FAIL_ON_ERRORS_IN_FORM_HANDLER_PLUGINS``, + ``FOBI_FAIL_ON_MISSING_INTEGRATION_FORM_ELEMENT_PLUGINS`` and + ``FOBI_FAIL_ON_MISSING_INTEGRATION_FORM_HANDLER_PLUGINS`` used to be set to + ``False`` by default (silencing exceptions). It's no longer so. Exceptions + will cause errors from now on (you might get error 500). If you want old + behavior, set them to ``False``. + 0.14 ---- 2019-05-24 diff --git a/docs/changelog.rst b/docs/changelog.rst index 4a6cff0b5..cb9f8ecb2 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -15,6 +15,24 @@ are used for versioning (schema follows below): 0.3.4 to 0.4). - All backwards incompatible changes are mentioned in this document. +0.15 +---- +2019-06-20 + +.. note:: + + Although this release does not contain major backwards incompatible + changes, some things you have had working in past might break. + +- The following settings + ``FOBI_FAIL_ON_ERRORS_IN_FORM_ELEMENT_PLUGINS``, + ``FOBI_FAIL_ON_ERRORS_IN_FORM_HANDLER_PLUGINS``, + ``FOBI_FAIL_ON_MISSING_INTEGRATION_FORM_ELEMENT_PLUGINS`` and + ``FOBI_FAIL_ON_MISSING_INTEGRATION_FORM_HANDLER_PLUGINS`` used to be set to + ``False`` by default (silencing exceptions). It's no longer so. Exceptions + will cause errors from now on (you might get error 500). If you want old + behavior, set them to ``False``. + 0.14 ---- 2019-05-24 diff --git a/docs/index.rst b/docs/index.rst index 4b9c397cf..c6bbb1b2b 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -27,10 +27,11 @@ Prerequisites Key concepts ============ -- Each form consists of elements. Form elements are divided into two groups: +- Each form consists of elements. Form elements are divided into groups: (a) form fields (input field, textarea, hidden field, file field, etc.). (b) content (presentational) elements (text, image, embed video, etc.). + (c) security elements (captcha, etc). - Number of form elements is not limited. - Each form may contain handlers. Handler processes the form data (for example, @@ -706,7 +707,7 @@ Defining the Sample mail handler plugin. name = _("Sample mail") form = SampleMailForm - def run(self, form_entry, request, form): + def run(self, form_entry, request, form, form_element_entries=None): """To be executed by handler.""" send_mail( self.data.subject, @@ -716,6 +717,12 @@ Defining the Sample mail handler plugin. fail_silently=True ) +Register the plugin + +.. code-block:: python + + form_handler_plugin_registry.register(SampleMailHandlerPlugin) + Some form handlers are configurable, some others not. In order to have a user friendly way of showing the form handler settings, what's sometimes needed, a ``plugin_data_repr`` method has been introduced. @@ -2342,6 +2349,12 @@ To test just your working environment type: ./runtests.py +To run a single test class in a given test module in your working environment type: + +.. code-block:: sh + + ./runtests.py src/fobi/tests/test_browser_build_dynamic_forms.py::FobiBrowserBuldDynamicFormsTest -k "test_2004_submit_form" + It's assumed that you have all the requirements installed. If not, first install the test requirements: diff --git a/setup.py b/setup.py index 7e963e859..8b9df1779 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from distutils.version import LooseVersion from setuptools import setup, find_packages -version = '0.14' +version = '0.15' # *************************************************************************** # ************************** Python version ********************************* diff --git a/src/fobi/__init__.py b/src/fobi/__init__.py index 662720681..c88e4daf3 100644 --- a/src/fobi/__init__.py +++ b/src/fobi/__init__.py @@ -1,5 +1,5 @@ __title__ = 'django-fobi' -__version__ = '0.14' +__version__ = '0.15' __author__ = 'Artur Barseghyan ' __copyright__ = '2014-2019 Artur Barseghyan' __license__ = 'GPL 2.0/LGPL 2.1'