... odels.functions import Length , Upper >>> from django.db.models.lookups import GreaterThan # Find companies that have more employees than chairs. >>> Company . objects . filter ( num_employees__gt = F ( "num_chairs" )) # Find companies that have at least ... twice as many employees # as chairs. Both the querysets below are equivalent. >>> Company . objects . filter ( num_employees__gt = F ( "num_chairs ... " ) * 2 ) >>> Company . objects . filter ( num_employees__gt = F ( "num_chairs" ) + F ( "num_chairs" )) # How many chairs are needed for each company to seat all employees? >>> co ... ... odels.functions import Length , Upper >>> from django.db.models.lookups import GreaterThan # Find companies that have more employees than chairs. >>> Company . objects . filter ( num_employees__gt = F ( "num_chairs" )) # Find companies that have at least ... twice as many employees # as chairs. Both the querysets below are equivalent. >>> Company . objects . filter ( num_employees__gt = F ( "num_chairs ... " ) * 2 ) >>> Company . objects . filter ( num_employees__gt = F ( "num_chairs" ) + F ( "num_chairs" )) # How many chairs are needed for each company to seat all employees? >>> co ... ... 高いメソッド (たとえばデータベースを操作するようなメソッド) に何度もアクセスする際に便利です。 例: {% with total = business.employees.count %} {{ total }} employee {{ total | pluralize }} {% endwith %} 値を組み込んだ変数 (上の例でいえば total ) は {% with ... とができます: {% with alpha = 1 beta = 2 %} ... {% endwith %} 注釈 従来の冗長な書式もサポートされています: {% with business.employees.count as total %} 組み込みフィルタリファレンス ¶ add ¶ 入力値に対して引数の値を加算します。 例: {{ value | add :"2" }} val ... ... 高いメソッド (たとえばデータベースを操作するようなメソッド) に何度もアクセスする際に便利です。 例: {% with total = business.employees.count %} {{ total }} employee {{ total | pluralize }} {% endwith %} 値を組み込んだ変数 (上の例でいえば total ) は {% with ... とができます: {% with alpha = 1 beta = 2 %} ... {% endwith %} 注釈 従来の冗長な書式もサポートされています: {% with business.employees.count as total %} 組み込みフィルタリファレンス ¶ add ¶ 入力値に対して引数の値を加算します。 例: {{ value | add :"2" }} val ... 2026年10月08日