prepare 0.6.4; minor fixes

This commit is contained in:
Artur Barseghyan 2015-12-24 14:34:11 +01:00
parent f0039ab28b
commit 2e80834754
6 changed files with 22 additions and 13 deletions

View file

@ -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.6.4
-----
2015-12-24
- Minor fixes.
0.6.3
-----
2015-12-23

View file

@ -9,7 +9,7 @@ django-formtools==1.0
django-localeurl==2.0.2
django-nine==0.1.6
django-nonefield==0.1
django-registration-redux==1.3a0
django-registration-redux>=1.3a0
docopt==0.4.0
docutils==0.12
easy-thumbnails==2.3

View file

@ -10,7 +10,7 @@ django-debug-toolbar>=0.11.0
django-formtools
django-localeurl>=2.0.2
django-nine>=0.1.6
django-registration-redux>=1.1
django-registration-redux>=1.3a0
docutils
ipdb
ipython

View file

@ -69,7 +69,7 @@ for static_dir in static_dirs:
for locale_dir in locale_dirs:
locale_files += [os.path.join(locale_dir, f) for f in os.listdir(locale_dir)]
version = '0.6.3'
version = '0.6.4'
install_requires = [
'Pillow>=2.0.0',

View file

@ -1,6 +1,6 @@
__title__ = 'django-fobi'
__version__ = '0.6.3'
__build__ = 0x00004c
__version__ = '0.6.4'
__build__ = 0x00004d
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>'
__copyright__ = '2014-2015 Artur Barseghyan'
__license__ = 'GPL 2.0/LGPL 2.1'

View file

@ -51,15 +51,18 @@ class SavedFormDataEntry(models.Model):
:return string:
"""
headers = json.loads(self.form_data_headers)
data = json.loads(self.saved_data)
for key, value in data.items():
if isinstance(value, string_types) and \
(value.startswith(settings.MEDIA_URL) or \
value.startswith('http://') or value.startswith('https://')):
try:
headers = json.loads(self.form_data_headers)
data = json.loads(self.saved_data)
for key, value in data.items():
if isinstance(value, string_types) and \
(value.startswith(settings.MEDIA_URL) or \
value.startswith('http://') or value.startswith('https://')):
data[key] = '<a href="{value}">{value}</a>'.format(value=value)
data[key] = '<a href="{value}">{value}</a>'.format(value=value)
return two_dicts_to_string(headers, data)
return two_dicts_to_string(headers, data)
except (ValueError, json.decoder.JSONDecodeError as err):
return ''
formatted_saved_data.allow_tags = True
formatted_saved_data.short_description = _("Saved data")