... ィスとしては良い例ではありません。しかし、データベースにとらわれない双方向のトランスフォームとしては良い例でしょう。 SQL関数 UPPER() を使用して比較前に値を変換する UpperCase トランスフォーマーを定義します。 bilateral = True を定義して、この変換が lhs と ... rhs の両方に適用されることを示します: from django.db.models import Transform class UpperCase ( Transform ): lookup_name = "upper" function = "UPPER" bilateral = True 次に、それを登録しましょう: from django.db.mo ... dels import CharField , TextField CharField . register_lookup ( UpperCase ) TextField . register_lookup ( UpperCase ) これで、 Author.objects.filter(name__upper="doe") は次のような大文字小文字 ... ... sername_idx" , ) varchar_pattern_ops を使用して Lower('username') にインデックスを作成します: UniqueConstraint ( OpClass ( Upper ( "description" ), name = "text_pattern_ops" ), name = "upper_description_unique" , ) Upper('description') を使って text_p ... ... leanField に対して有効なルックアップに連結できます。 >>> Event . objects . filter ( ages__lower_inf = True ) <QuerySet []> upper_inc 渡されたブール値に応じて、上限値を包含または非包含として持つオブジェクトを返します。これは、 BooleanField に対して有効 ... なルックアップに連結できます。 >>> Event . objects . filter ( ages__upper_inc = True ) <QuerySet []> upper_inf 渡された真偽値に応じて、上限が無制限 (無限) または有界のオブジェクトを返します。 Bool ... eanField の有効なルックアップに連結できます。 >>> Event . objects . filter ( ages__upper_inf = True ) <QuerySet [<Event: Pub trip>]> 独自の範囲型を定義する PostgreSQLでは、独自の範囲型の定義が可能です。Djangoのモ ... ... ... ... ... is used to implement the corresponding striptags template filter, which was thus also vulnerable. strip_tags() now has an upper limit of recursive calls to HTMLParser before raising a SuspiciousOperation exception. Remember that absolutely NO guarant ... ... is used to implement the corresponding striptags template filter, which was thus also vulnerable. strip_tags() now has an upper limit of recursive calls to HTMLParser before raising a SuspiciousOperation exception. Remember that absolutely NO guarant ... ... >>> Author . objects . update ( name = Trim ( "name" )) 1 >>> print ( Author . objects . get ( alias = "j" ) . name ) John Upper class Upper ( expression , ** extra ) [ソース] 単一のテキストフィールドまたは式を受け取り、大文字の表現を返します。 Length ... と同様に、トランスフォームとして登録することもできます。 使用例: >>> from django.db.models.functions import Upper >>> Author . objects . create ( name = "Margaret Smith" ) >>> author = Author . objects . annotate ( name_upper = Upper ( ... "name" )) . get () >>> print ( author . name_upper ) MARGARET SMITH UUID functions UUID4 New in Django 6.1. class UUID4 [ソース] Generates a version 4 UUID , which is random ... ... is used to implement the corresponding striptags template filter, which was thus also vulnerable. strip_tags() now has an upper limit of recursive calls to HTMLParser before raising a SuspiciousOperation exception. Remember that absolutely NO guarant ... 2026年10月08日