diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-10-11 15:59:02 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-10-11 16:16:49 +0200 |
commit | 9b5313164efc9e21d8535b03a1f1e5c17e6f2b4a (patch) | |
tree | 5d4f457ff73136bab3a2222d5b7d256aa32dd134 /ishtar_common/utils.py | |
parent | 5c609eda727efbfc40607a16eead8ef1d149e5ef (diff) | |
download | Ishtar-9b5313164efc9e21d8535b03a1f1e5c17e6f2b4a.tar.bz2 Ishtar-9b5313164efc9e21d8535b03a1f1e5c17e6f2b4a.zip |
📝 annex 3 technic - fix MAX_UPLOAD_SIZE help text
Diffstat (limited to 'ishtar_common/utils.py')
-rw-r--r-- | ishtar_common/utils.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py index d4453ff5a..95a7ebbaa 100644 --- a/ishtar_common/utils.py +++ b/ishtar_common/utils.py @@ -2005,10 +2005,11 @@ def m2m_historization_changed(sender, **kwargs): obj.save() -def max_size_help(): - msg = str(_("The maximum supported file size is {} Mo.")).format( - settings.MAX_UPLOAD_SIZE - ) +def max_size_help(help_for_doc=False): + max_size = settings.MAX_UPLOAD_SIZE + if help_for_doc: + max_size = '`MAX_UPLOAD_SIZE`' + msg = str(_("The maximum supported file size is {} Mo.")).format(max_size) return msg |