mirror of
https://github.com/Hopiu/django-fobi.git
synced 2026-03-16 22:10:28 +00:00
prepare 0.8.4; fixes
This commit is contained in:
parent
f3ef3f0fac
commit
7d8cced9a4
4 changed files with 27 additions and 4 deletions
|
|
@ -15,6 +15,13 @@ are used for versioning (schema follows below):
|
|||
0.3.4 to 0.4).
|
||||
- All backwards incompatible changes are mentioned in this document.
|
||||
|
||||
0.8.4
|
||||
-----
|
||||
2016-10-19
|
||||
|
||||
- Fix broken export (to JSON) of form entries.
|
||||
- Fix broken import (from JSON) of form entries.
|
||||
|
||||
0.8.3
|
||||
-----
|
||||
2016-10-18
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -138,7 +138,7 @@ for locale_dir in locale_dirs:
|
|||
for f
|
||||
in os.listdir(locale_dir)]
|
||||
|
||||
version = '0.8.3'
|
||||
version = '0.8.4'
|
||||
|
||||
install_requires = [
|
||||
'Pillow>=2.0.0',
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
__title__ = 'django-fobi'
|
||||
__version__ = '0.8.3'
|
||||
__build__ = 0x00005a
|
||||
__version__ = '0.8.4'
|
||||
__build__ = 0x00005b
|
||||
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>'
|
||||
__copyright__ = '2014-2016 Artur Barseghyan'
|
||||
__license__ = 'GPL 2.0/LGPL 2.1'
|
||||
|
|
|
|||
|
|
@ -2170,7 +2170,7 @@ def export_form_entry(request, form_entry_id, template_name=None):
|
|||
'slug': form_entry.slug,
|
||||
'is_public': False,
|
||||
'is_cloneable': False,
|
||||
'position': form_entry.position,
|
||||
# 'position': form_entry.position,
|
||||
'success_page_title': form_entry.success_page_title,
|
||||
'success_page_message': form_entry.success_page_message,
|
||||
'action': form_entry.action,
|
||||
|
|
@ -2237,6 +2237,22 @@ def import_form_entry(request, template_name=None):
|
|||
form_elements_data = form_data.pop('form_elements', [])
|
||||
form_handlers_data = form_data.pop('form_handlers', [])
|
||||
|
||||
form_data_keys_whitelist = (
|
||||
'name',
|
||||
'slug',
|
||||
'is_public',
|
||||
'is_cloneable',
|
||||
# 'position',
|
||||
'success_page_title',
|
||||
'success_page_message',
|
||||
'action',
|
||||
)
|
||||
|
||||
# In this way we keep possible trash out.
|
||||
for key in form_data.keys():
|
||||
if key not in form_data_keys_whitelist:
|
||||
form_data.pop(key)
|
||||
|
||||
# User information we always recreate!
|
||||
form_data['user'] = request.user
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue