From 4977ca6f61f6353543fd177a440300dddc5319e9 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 6 Oct 2025 20:49:48 +0200 Subject: ✨ Find - statistics: add top container MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/utils.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'ishtar_common/utils.py') diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py index 666e05bd9..23fe5b1a9 100644 --- a/ishtar_common/utils.py +++ b/ishtar_common/utils.py @@ -65,7 +65,7 @@ from django.core.files import File from django.core.files.storage import FileSystemStorage from django.core.validators import EMPTY_VALUES, MaxValueValidator from django.db import models -from django.db.models import Q +from django.db.models import Func, Q from django.db.models.functions import Length from django.http import HttpResponseRedirect from django.urls import reverse, NoReverseMatch @@ -193,6 +193,14 @@ class Round(models.Func): arg_joiner = "::numeric, " +class SplitPart(Func): + """ + PostgreSQL split part annotation + """ + function = 'split_part' + arity = 3 + + CSV_OPTIONS = {"delimiter": ",", "quotechar": '"', "quoting": QUOTE_ALL} -- cgit v1.2.3