per page, with , order by , clip by
Results of 1 - 10 of about 19 for FloatField (0.014 sec.)
データベース関数 15470
データベース関数 The classes documented below provide a way for users to use functions provided by the underlying database as annotations, aggregations, or filters in Django. Functions are also expressions , so they can be used and combined ... eld ) [ソース] 式 expression の結果の型を output_field の型に強制的に変更します。 使用例: >>> from django.db.models import FloatField >>> from django.db.models.functions import Cast >>> Author . objects . create ( age = 25 , name = "Margaret Smith" ) >>> a ... uthor = Author . objects . annotate ( ... age_as_float = Cast ( "age" , output_field = FloatField ()), ... ) . get () >>> print ( author . age_as_float ) 25.0 Coalesce class Coalesce ( * expressions , ** extra ) [ソース] ... ': 'msmith', 'age': 50} 数学関数 数学関数の例では、以下のモデルを使用します: class Vector ( models . Model ): x = models . FloatField () y = models . FloatField () Abs class Abs ( expression , ** extra ) [ソース] 数値フィールドまたは式の、絶対値を返します。 ...
https://man.mtool.work/django/6.1/ref/models/database-functions.html
Porting your apps from Django 0.96 to 1.0 9425
Porting your apps from Django 0.96 to 1.0 Django 1.0 breaks compatibility with 0.96 in some areas. This guide will help you port 0.96 projects and apps to 1.0. The first part of this document includes the common changes needed to run with 1 ... Field ( max_length = 100 ) published = models . DateField ( default = datetime . datetime . now ) DecimalField is new, and FloatField is now a proper float Old (0.96): class MyModel ( models . Model ): field_name = models . FloatField ( max_digits = 10 , d ... s . DecimalField ( max_digits = 10 , decimal_places = 3 ) ... If you forget to make this change, you will see errors about FloatField not taking a max_digits attribute in __init__ , because the new FloatField takes no precision-related arguments. もしMySQL ... または PostgreSQLを使用しているのなら、特に変更は必要ありません。 DecimalField のデータベースカラム型は、旧来の FloatField と同じです。 If you're using SQLite, you need to force the database to view the appropriate columns as decimal types, rath ...
https://man.mtool.work/django/6.1/releases/1.0-porting-guide.html
カスタムのルックアップを書く 9084
カスタムのルックアップを書く Django には (たとえば exact や icontains などの) フィルタリングを行う 組み込みのルックアップ がたくさんあります。このドキュメントでは、カスタムルックアップを作る方法や、既存のルックアップの動作を変更する方法につ ... 連する点や複素数)を表すフィールドに AbsoluteValue を適用すると仮定します。 次に、トランスフォームが次のルックアップのために FloatField 型を返すように指定したいかもしれません。これは、次のようにトランスフォームに output_field 属性を追加することで実現できます ... : from django.db.models import FloatField , Transform class AbsoluteValue ( Transform ): lookup_name = "abs" function = "ABS" @property def output_field ( self ): r ... eturn FloatField () これにより abs__lte のようなそれ以降のルックアップが FloatField の場合と同じように動作することが保証されます。 効率的な ...
https://man.mtool.work/django/6.1/howto/custom-lookups.html
GeoDjango チュートリアル 8759
GeoDjango チュートリアル はじめに GeoDjangoは、Django用の標準のcontribモジュールであり、それを世界クラスの地理情報Webフレームワークに変えます。GeoDjangoは、位置情報サービスなどの地理情報Webアプリケーションを作成するのを可能な限り簡単にするこ ... ) region = models . IntegerField ( "Region Code" ) subregion = models . IntegerField ( "Sub-Region Code" ) lon = models . FloatField () lat = models . FloatField () # GeoDjango-specific: a geometry field (MultiPolygonField) mpoly = models . MultiPolygonFi ... ) pop2005 = models . IntegerField () region = models . IntegerField () subregion = models . IntegerField () lon = models . FloatField () lat = models . FloatField () geom = models . MultiPolygonField ( srid = 4326 ) # Auto-generated `LayerMapping` dictiona ...
https://man.mtool.work/django/6.1/ref/contrib/gis/tutorial.html
モデルフィールドリファレンス 8537
モデルフィールドリファレンス このドキュメントには、Django が提供するフィールドオプション field options とフィールド型 field types を含む、 Field のすべての API リファレンスが記載されています。 注釈 フィールドは django.db.models.fields に定義 ... ドのデフォルトのフォームウィジェットは、 localize が False のとき NumberInput で、そうでなければ TextInput となります。 注釈 FloatField クラスと DecimalField クラスの違いについては FloatField vs. DecimalField を参照してください。また、Decimal に関する SQLite ... har カラムとして、データベース上に生成されます。他のフィールドと同様に、 max_length 引数を使って最大文字数を変更できます。 FloatField class FloatField ( ** options ) [ソース] float インスタンスによって表される Python の浮動小数点数です。 このフィールドのデ ... フォルトのフォームウィジェットは、 localize が False のとき NumberInput で、そうでなければ TextInput となります。 FloatField と DecimalField の比較 FloatField クラスは、 DecimalField クラスと混同されることがあります。両方とも実数を表しますが、異な ...
https://man.mtool.work/django/6.1/ref/models/fields.html
GeoDjangoの管理コマンド 8418
GeoDjangoの管理コマンド inspectdb django-admin inspectdb django.contrib.gis が INSTALLED_APPS に入っている場合、 inspectdb 管理コマンドは GeoDjango のコマンドでオーバーライドされます。オーバーライドされたコマンドは空間を認識し、自動生成され ... カンマ区切りリストを使用します。該当するすべてのフィールドに適用するには true を設定します。 --decimal DECIMAL デフォルトの FloatField の代わりに DecimalField を生成するには OGR float フィールドをカンマ区切りで指定します。すべての OGR float フィールドに適用 ...
https://man.mtool.work/django/6.1/ref/contrib/gis/commands.html
アグリゲーション (集計) 8418
アグリゲーション (集計) Djangoのデータベース抽象API のトピックガイドでは、個別のオブジェクトの作成、取得、削除を行うDjangoのクエリの使い方を説明しました。しかし、オブジェクトのコレクションを 集計 (アグリゲーション) した値や、集計することによ ... pages = models . IntegerField () price = models . DecimalField ( max_digits = 10 , decimal_places = 2 ) rating = models . FloatField () authors = models . ManyToManyField ( Author ) publisher = models . ForeignKey ( Publisher , on_delete = models . CASCAD ... 81.20')} # Difference between the highest priced book and the average price of all books. >>> from django.db.models import FloatField >>> Book . objects . aggregate ( ... price_diff = Max ( "price" , output_field = FloatField ()) - Avg ( "price" ) ... ) {' ...
https://man.mtool.work/django/6.1/topics/db/aggregation.html
索引 7974
索引 記号 | _ | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | ア | イ | ク | コ | シ | ス | テ | ハ | ヒ | フ | メ | モ | ロ | 具 | 国 | 環 | 翻 | 表 | 言 | 長 記号 -- dbshell コマン ... flatpages.middleware のクラス) FlatPageSitemap (django.contrib.flatpages.sitemaps のクラス) flatten() (Context のメソッド) FloatField (django.db.models のクラス) (django.forms のクラス) floatformat template filter Floor (django.db.models.functions のクラス ... sses (storage.ManifestStaticFilesStorage の属性) max_random_bytes (GZipMiddleware の属性) max_value (DecimalField の属性) (FloatField の属性) (IntegerField の属性) max_x (Envelope の属性) max_y (Envelope の属性) MaxLengthValidator (django.core.validators の ... min_length (CharField の属性) (SimpleArrayField の属性) min_num (InlineModelAdmin の属性) min_value (DecimalField の属性) (FloatField の属性) (IntegerField の属性) min_x (Envelope の属性) min_y (Envelope の属性) MinimumLengthValidator (django.contrib.auth. ...
https://man.mtool.work/django/6.1/genindex.html
クエリ式 (Query Expression) 7974
クエリ式 (Query Expression) クエリ式 (query expression) は、update、create、filter、order by、annotation、またはaggregateの一部として使用できる値または計算を記述します。式が真偽値を出力する場合、フィルタで直接使用できます。クエリの記述に使用 ... ルド型が混在する複雑な式のように、 Django が結果のフィールド型を自動的に判断できない場合だけです。例えば、 DecimalField() と FloatField() を足す場合、 output_field=FloatField() のように出力フィールドが必要になります。 output_field では、特定のモデルフィールド ...
https://man.mtool.work/django/6.1/ref/models/expressions.html
モデルからフォームを作成する 7974
モデルからフォームを作成する ModelForm class ModelForm [ソース] データベース中心のアプリケーションを作成している場合、Django モデルに密接にマップするフォームを使うことになるでしょう。例えば、 BlogComment モデルを持っていて、閲覧者がコメント ... ecimalField DecimalField DurationField DurationField EmailField EmailField FileField FileField FilePathField FilePathField FloatField FloatField ForeignKey ModelChoiceField (see below) ImageField ImageField IntegerField IntegerField IPAddressField IPAddres ...
https://man.mtool.work/django/6.1/topics/forms/modelforms.html
PREV 1 2 NEXT