per page, with , order by , clip by
Results of 1 - 10 of about 33 for decimal (0.009 sec.)
GeoDjangoの管理コマンド 10524
GeoDjangoの管理コマンド inspectdb django-admin inspectdb django.contrib.gis が INSTALLED_APPS に入っている場合、 inspectdb 管理コマンドは GeoDjango のコマンドでオーバーライドされます。オーバーライドされたコマンドは空間を認識し、自動生成され ... 加するには、OGR フィールド名のカンマ区切りリストを使用します。該当するすべてのフィールドに適用するには true を設定します。 --decimal DECIMAL デフォルトの FloatField の代わりに DecimalField を生成するには OGR float フィールドをカンマ区切りで指定します。すべ ...
https://man.mtool.work/django/6.1/ref/contrib/gis/commands.html
モデルフィールドリファレンス 10524
モデルフィールドリファレンス このドキュメントには、Django が提供するフィールドオプション field options とフィールド型 field types を含む、 Field のすべての API リファレンスが記載されています。 注釈 フィールドは django.db.models.fields に定義 ... def get_currencies (): return { i : i for i in settings . CURRENCIES } class Expense ( models . Model ): amount = models . DecimalField ( max_digits = 10 , decimal_places = 2 ) currency = models . CharField ( max_length = 3 , choices = get_currencies ) ... 当てはまります。 datetime.date インスタンスと DateTimeField の日付部分を比較するには、 date ルックアップを使用してください。 DecimalField class DecimalField ( max_digits = None , decimal_places = None , ** options ) [ソース] 固定精度の10進数で、Python では ... Decimal インスタンスで表されます。これは DecimalValidator を使用して入力を検証します。 Has the following arguments: DecimalField. ...
https://man.mtool.work/django/6.1/ref/models/fields.html
バリデータ (Validator) 10524
バリデータ (Validator) バリデータを記述する バリデータ (validator) は呼び出し可能なオブジェクトで、値を受け取り、ある基準を満たしていない場合に ValidationError を発生させます。バリデータは異なるタイプのフィールド間でバリデーションロジックを ... min_length' のエラーコードを持つ ValidationError を発生させます。 limit_value には呼び出し可能オブジェクトを指定できます。 DecimalValidator class DecimalValidator ( max_digits , decimal_places ) [ソース] 以下のコードで ValidationError を例外を発生させま ... す: 桁数が max_digits より大きい場合は 'max_digits' 。 小数点以下の桁数が decimal_places より大きい場合は 'max_decimal_places' 。 整数部の桁数が max_digits と decimal_places の差よりも大きい場合は、 'max_ ...
https://man.mtool.work/django/6.1/ref/validators.html
Django 1.11.19 リリースノート 10524
Django 1.11.19 リリースノート February 11, 2019 Django 1.11.19 fixes a security issue in 1.11.18. CVE-2019-6975: Memory exhaustion in django.utils.numberformat.format() If django.utils.numberformat.format() -- used by contrib.admin as well ... as the floatformat , filesizeformat , and intcomma templates filters -- received a Decimal with a large number of digits or a large exponent, it could lead to significant memory usage due to a call to '{:f}'.forma ... t() . To avoid this, decimals with more than 200 digits are now formatted using scientific notation. ...
https://man.mtool.work/django/6.1/releases/1.11.19.html
Django 2.0.11 リリースノート 10524
Django 2.0.11 リリースノート February 11, 2019 Django 2.0.11 fixes a security issue in 2.0.10. CVE-2019-6975: Memory exhaustion in django.utils.numberformat.format() If django.utils.numberformat.format() -- used by contrib.admin as well as ... the floatformat , filesizeformat , and intcomma templates filters -- received a Decimal with a large number of digits or a large exponent, it could lead to significant memory usage due to a call to '{:f}'.forma ... t() . To avoid this, decimals with more than 200 digits are now formatted using scientific notation. ...
https://man.mtool.work/django/6.1/releases/2.0.11.html
マイグレーション 10524
マイグレーション マイグレーション (Migrations) は、Django でモデルに対して行った変更 (フィールドの追加やモデルの削除など) をデータベーススキーマに反映させる方法です。大抵のマイグレーションは自動で行われるものの、いつマイグレーションが作られ ... datetime.date 、 datetime.time 、 datetime.datetime インスタンス (timezone-aware なものも含む) zoneinfo.ZoneInfo instances decimal.Decimal インスタンス enum.Enum または enum.Flag インスタンス uuid.UUID インスタンス functools.partial() and functools.part ... ラムダ式 カスタムシリアライザ カスタムシリアライザを書けば、他の型もシリアライズできます。たとえば、 Django がデフォルトで Decimal をシリアライズしていない場合、次のようにできます: from decimal import Decimal from django.db.migrations.serializer import ... BaseSerializer from django.db.migrations.writer import MigrationWriter class DecimalSerializer ( BaseSerializer ): def serialize ( self ): return repr ( self . value ), { "from decimal import Decimal" } Migr ...
https://man.mtool.work/django/6.1/topics/migrations.html
Django 2.1.6 リリースノート 9866
Django 2.1.6 リリースノート February 11, 2019 Django 2.1.6 fixes a security issue and a bug in 2.1.5. CVE-2019-6975: Memory exhaustion in django.utils.numberformat.format() If django.utils.numberformat.format() -- used by contrib.admin as w ... ell as the floatformat , filesizeformat , and intcomma templates filters -- received a Decimal with a large number of digits or a large exponent, it could lead to significant memory usage due to a call to '{:f}'.forma ... t() . To avoid this, decimals with more than 200 digits are now formatted using scientific notation. バグ修正 Made the obj argument of InlineModelAdmin ...
https://man.mtool.work/django/6.1/releases/2.1.6.html
フォーム フィールド 9545
フォーム フィールド class Field [ソース] Form クラスを作成時の一番重要な部分は、form のフィールド (field) の定義です。各フィールドにはカスタムの検証ロジックがあり、他にいくつかのフックもあります。 Field. clean ( value ) [ソース] Field クラス ... と DATE_INPUT_FORMATS から取得されます。また、表示形式のローカライズについては 表示形式のローカライズ も参照してください。 DecimalField class DecimalField ( ** kwargs ) [ソース] デフォルトのウィジェット: Field.localize が False のとき NumberInput 、 Tru ... e のとき TextInput . 空の値: None 正規化後の値: Python の decimal になります。 指定された値が10進数であることを検証します。 max_value と min_value が提供されている場合は MaxValueValidator ... す。先頭及び末尾の空白は無視されます。 エラーメッセージのキー: required , invalid , max_value , min_value , max_digits , max_decimal_places , max_whole_digits , step_size 。 max_value および min_value のエラーメッセージには %(limit_value)s が含まれる場合が ...
https://man.mtool.work/django/6.1/ref/forms/fields.html
アグリゲーション (集計) 9545
アグリゲーション (集計) Djangoのデータベース抽象API のトピックガイドでは、個別のオブジェクトの作成、取得、削除を行うDjangoのクエリの使い方を説明しました。しかし、オブジェクトのコレクションを 集計 (アグリゲーション) した値や、集計することによ ... Book ( models . Model ): name = models . CharField ( max_length = 300 ) pages = models . IntegerField () price = models . DecimalField ( max_digits = 10 , decimal_places = 2 ) rating = models . FloatField () authors = models . ManyToManyField ( Author ... exist. >>> from django.db.models import Max >>> Book . objects . aggregate ( Max ( "price" , default = 0 )) {'price__max': Decimal('81.20')} # Difference between the highest priced book and the average price of all books. >>> from django.db.models impor ... in >>> Book . objects . aggregate ( Avg ( "price" ), Max ( "price" ), Min ( "price" )) {'price__avg': 34.35, 'price__max': Decimal('81.20'), 'price__min': Decimal('12.99')} QuerySet の各アイテムに対する集計を生成する QuerySet 内の各オブジェクトに対して個 ...
https://man.mtool.work/django/6.1/topics/db/aggregation.html
Porting your apps from Django 0.96 to 1.0 8567
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 ... ): title = models . CharField ( 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 . Floa ... tField ( max_digits = 10 , decimal_places = 3 ) ... New (1.0): class MyModel ( models . Model ): field_name = models . DecimalField ( max_digits = 10 , decim ... oatField takes no precision-related arguments. もしMySQL または PostgreSQLを使用しているのなら、特に変更は必要ありません。 DecimalField のデータベースカラム型は、旧来の FloatField と同じです。 If you're using SQLite, you need to force the database to vi ...
https://man.mtool.work/django/6.1/releases/1.0-porting-guide.html
PREV 1 2 3 4 NEXT