diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-08-17 15:57:13 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-08-17 15:57:13 +0200 |
commit | 1786063186db3e0dcd03d358b9ab3b292ab49074 (patch) | |
tree | 5fe0db8d67a565101ce1e4ce734e57f45a43f2e0 /ishtar_common/utils.py | |
parent | 328dca56af062b0be1597efa66b564d274d3b7ac (diff) | |
download | Ishtar-1786063186db3e0dcd03d358b9ab3b292ab49074.tar.bz2 Ishtar-1786063186db3e0dcd03d358b9ab3b292ab49074.zip |
Admin: importer column display col string
Diffstat (limited to 'ishtar_common/utils.py')
-rw-r--r-- | ishtar_common/utils.py | 8 |
1 files changed, 8 insertions, 0 deletions
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 |