diff --git a/modoboa/lib/templatetags/lib_tags.py b/modoboa/lib/templatetags/lib_tags.py index fa4908df0..88e01a000 100644 --- a/modoboa/lib/templatetags/lib_tags.py +++ b/modoboa/lib/templatetags/lib_tags.py @@ -100,7 +100,5 @@ def extra_static_content(caller, st_type, user): @register.filter(name='localize_header_name') def localize_header_name(headername): """ Localizes the header names """ - names = {'From': _('From'), 'To': _('To'), 'Date': _('Date'), 'Subject': _('Subject')} - if names.has_key(headername): - return names[headername] - return headername + names = {"From": _("From"), "To": _("To"), "Date": _("Date"), "Subject": _("Subject")} + return names.get(headername, headername) diff --git a/test_project/test_project/settings.py b/test_project/test_project/settings.py index b26afe484..e4ca61d1d 100644 --- a/test_project/test_project/settings.py +++ b/test_project/test_project/settings.py @@ -106,26 +106,6 @@ USE_L10N = False USE_TZ = True -# Webmail datetime formats according to -# https://docs.djangoproject.com/en/1.10/ref/templates/builtins/ -# modoboa-webmail is able to show the datetime of emails -# in two ways. -# If none is provided, default is RFC 5322 formatted date. -# For this, USE_L10N must be set to True! - -# emails of the last week -# en-us style -WEBMAIL_SHORT_DATETIME_FORMAT = "l, P" -# european style -# WEBMAIL_SHORT_DATETIME_FORMAT = "l, H:i" - -# emails older than a week -# en-us style -WEBMAIL_DATETIME_FORMAT = "N, j Y P" -# european style -# WEBMAIL_DATETIME_FORMAT = "d. N Y H:i" - - # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.6/howto/static-files/