From 05fb3b7cb03f4dd31e77a6f6291b568e7e97f5f7 Mon Sep 17 00:00:00 2001 From: Artur Barseghyan Date: Mon, 24 Oct 2016 01:50:53 +0200 Subject: [PATCH] prepare 0.9.1; minor fixes --- CHANGELOG.rst | 6 ++++++ TODOS.rst | 9 +++++++++ setup.py | 2 +- src/fobi/__init__.py | 4 ++-- src/fobi/views.py | 5 ++++- 5 files changed, 22 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 266ea8e8..e3e65ab5 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.9.1 +----- +2016-10-24 + +- Minor fixes. + 0.9 --- 2016-10-24 diff --git a/TODOS.rst b/TODOS.rst index 47021ca3..f3e702b7 100644 --- a/TODOS.rst +++ b/TODOS.rst @@ -46,6 +46,15 @@ Roadmap Uncategorised ------------- +- In the form element plugins, when handling submit_form_data, somehow + make it possible to tell whether field returned should or should not + overwrite cleaned form data value (that's mainly interesting for form + wizards). +- Possibly, make plugins (same as form field plugins) for the thanks page of + the form wizard. +- Solve the issue with session/post data when plugin on the next step wants + to access data from the previous (not there should be an intermediate step + for form data first to be written into the session). - Make sure form element plugin widgets allow more customisations than they do now. For instance, setting an additional class or additional data attributes should be made really easy. A must! diff --git a/setup.py b/setup.py index e3074666..ecf1e5a6 100644 --- a/setup.py +++ b/setup.py @@ -204,7 +204,7 @@ for locale_dir in locale_dirs: for f in os.listdir(locale_dir)] -version = '0.9' +version = '0.9.1' install_requires = [] # If certain version of Django is already installed, choose version agnostic diff --git a/src/fobi/__init__.py b/src/fobi/__init__.py index 2b68d392..4b825a53 100644 --- a/src/fobi/__init__.py +++ b/src/fobi/__init__.py @@ -1,6 +1,6 @@ __title__ = 'django-fobi' -__version__ = '0.9' -__build__ = 0x000062 +__version__ = '0.9.1' +__build__ = 0x000063 __author__ = 'Artur Barseghyan ' __copyright__ = '2014-2016 Artur Barseghyan' __license__ = 'GPL 2.0/LGPL 2.1' diff --git a/src/fobi/views.py b/src/fobi/views.py index 67cc3d29..8c4e80ed 100644 --- a/src/fobi/views.py +++ b/src/fobi/views.py @@ -1518,7 +1518,10 @@ class FormWizardView(DynamicSessionWizardView): self.steps.current, field_key ) - form.data[wizard_form_key] = field_value + # Do not overwrite field data. Only empty or missing values. + if not (wizard_form_key in form.data + and form.data[wizard_form_key]): + form.data[wizard_form_key] = field_value # if the form is valid, store the cleaned data and files. self.storage.set_step_data(self.steps.current,