Skip to content

Commit

Permalink
prepare 0.5.3; minor fixes in the mail plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
barseghyanartur committed May 1, 2015
1 parent ff463c2 commit 1cab22b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ are used for versioning (schema follows below):
0.3.4 to 0.4).
- All backwards incompatible changes are mentioned in this document.

0.5.3
-------------------------------------
2015-05-02

- Minor fixes in the `mail
<https://github.com/barseghyanartur/django-fobi/tree/0.5.2/src/fobi/contrib/plugins/form_handlers/mail>`_
form handler plugin.

0.5.2
-------------------------------------
2015-04-26
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
for locale_dir in locale_dirs:
locale_files += [os.path.join(locale_dir, f) for f in os.listdir(locale_dir)]

version = '0.5.2'
version = '0.5.3'

install_requires = [
'Pillow>=2.0.0',
Expand Down
4 changes: 2 additions & 2 deletions src/fobi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__title__ = 'django-fobi'
__version__ = '0.5.2'
__build__ = 0x000037
__version__ = '0.5.3'
__build__ = 0x000038
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>'
__copyright__ = '2014-2015 Artur Barseghyan'
__license__ = 'GPL 2.0/LGPL 2.1'
Expand Down
14 changes: 11 additions & 3 deletions src/fobi/contrib/plugins/form_handlers/mail/fobi_form_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,19 @@ def plugin_data_repr(self):
:return string:
"""
to_email = None
# Handling more than one email address
if isinstance(self.data.to_email, (list, tuple)):
to_email = '{0} '.format(MULTI_EMAIL_FIELD_VALUE_SPLITTER).join(
self.data.to_email
)
else:
# Assume that it's string
to_email = self.data.to_email

context = {
'to_name': safe_text(self.data.to_name),
'to_email': '{0} '.format(MULTI_EMAIL_FIELD_VALUE_SPLITTER).join(
self.data.to_email
),
'to_email': to_email,
'subject': safe_text(self.data.subject),
}
return render_to_string('mail/plugin_data_repr.html', context)
Expand Down

0 comments on commit 1cab22b

Please sign in to comment.