From 1786063186db3e0dcd03d358b9ab3b292ab49074 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 17 Aug 2018 15:57:13 +0200 Subject: Admin: importer column display col string --- ishtar_common/utils.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ishtar_common/utils.py') diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py index 8cb06aacb..1c64f7940 100644 --- a/ishtar_common/utils.py +++ b/ishtar_common/utils.py @@ -441,6 +441,14 @@ def get_all_related_objects(model): ] +def num2col(n): + string = "" + while n > 0: + n, remainder = divmod(n - 1, 26) + string = chr(65 + remainder) + string + return string + + def merge_tsvectors(vectors): """ Parse tsvector to merge them in one string -- cgit v1.2.3