From 12f422fd95e3b5d6228f220c67ae2a203898007c Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 16 Jan 2019 20:09:34 +0100 Subject: Indication of the maximum file size in help for file fields --- ishtar_common/utils.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ishtar_common/utils.py') diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py index cbc7d069d..562992bdb 100644 --- a/ishtar_common/utils.py +++ b/ishtar_common/utils.py @@ -958,3 +958,10 @@ def m2m_historization_changed(sender, **kwargs): elif not obj.history_modifier: obj.skip_history_when_saving = True obj.save() + + +def max_size_help(): + msg = unicode(_(u"The maximum supported file size is {} Mo.")).format( + settings.MAX_UPLOAD_SIZE + ) + return msg -- cgit v1.2.3