per page, with , order by , clip by
Results of 1 - 10 of about 18 for Product (0.007 sec.)
複合主キー — Django 6.1 ドキュメント 13469
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 複合主キー ¶ Django では、すべてのモデルに主キーが存在します。デフォルトでは、この主キーは単一のフィールドで構成されます。 ほとんどの場合、単一の主キ ... 必要になることもあります。 複合主キーを使用するには、モデルを定義する際に pk 属性を CompositePrimaryKey に設定します: class Product ( models . Model ): name = models . CharField ( max_length = 100 ) class Order ( models . Model ): reference = models . Ch ... ield ( max_length = 20 , primary_key = True ) class OrderLineItem ( models . Model ): pk = models . CompositePrimaryKey ( "product_id" , "order_id" ) product = models . ForeignKey ( Product , on_delete = models . CASCADE ) order = models . ForeignKey ( ... te = models . CASCADE ) quantity = models . IntegerField () これにより、Django はテーブル作成時に複合主キー( PRIMARY KEY (product_id, order_id) )を作成するようになります。 複合主キーは tuple (タプル)で表現されます: >>> product = Product . objects . ...
https://man.mtool.work/django/6.1/topics/composite-primary-key.html
複合主キー — Django 6.1 ドキュメント 13126
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 複合主キー ¶ Django では、すべてのモデルに主キーが存在します。デフォルトでは、この主キーは単一のフィールドで構成されます。 ほとんどの場合、単一の主キ ... 必要になることもあります。 複合主キーを使用するには、モデルを定義する際に pk 属性を CompositePrimaryKey に設定します: class Product ( models . Model ): name = models . CharField ( max_length = 100 ) class Order ( models . Model ): reference = models . Ch ... ield ( max_length = 20 , primary_key = True ) class OrderLineItem ( models . Model ): pk = models . CompositePrimaryKey ( "product_id" , "order_id" ) product = models . ForeignKey ( Product , on_delete = models . CASCADE ) order = models . ForeignKey ( ... te = models . CASCADE ) quantity = models . IntegerField () これにより、Django はテーブル作成時に複合主キー( PRIMARY KEY (product_id, order_id) )を作成するようになります。 複合主キーは tuple (タプル)で表現されます: >>> product = Product . objects . ...
https://man.mtool.work/django/6.1/topics/composite-primary-key.html
モデルインスタンスリファレンス — Django 6.1 ドキュメント 8922
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » モデルインスタンスリファレンス ¶ このドキュメントでは、 Model API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提として ... トしたりするような単純な計算が必要になることがあります。これを実現する1つの方法は、Pythonで次のように計算を行うことです: >>> product = Product . objects . get ( name = "Venezuelan Beaver Cheese" ) >>> product . number_sold += 1 >>> product . save () データ ... this kind of relative update. Using F() 式 , the previous example is expressed as: >>> from django.db.models import F >>> product = Product . objects . get ( name = "Venezuelan Beaver Cheese" ) >>> product . number_sold = F ( "number_sold" ) + 1 >>> pr ... たい場合に望ましいでしょう。データベースで全てのモデルフィールドを更新しないようにすると、実行速度が少し向上します。例えば: product . name = "Name changed again" product . save ( update_fields = [ "name" ]) update_fields 引数は文字列を含む任意のイテラブル ...
https://man.mtool.work/django/6.1/ref/models/instances.html
モデルインスタンスリファレンス — Django 6.1 ドキュメント 8922
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » モデルインスタンスリファレンス ¶ このドキュメントでは、 Model API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提として ... トしたりするような単純な計算が必要になることがあります。これを実現する1つの方法は、Pythonで次のように計算を行うことです: >>> product = Product . objects . get ( name = "Venezuelan Beaver Cheese" ) >>> product . number_sold += 1 >>> product . save () データ ... this kind of relative update. Using F() 式 , the previous example is expressed as: >>> from django.db.models import F >>> product = Product . objects . get ( name = "Venezuelan Beaver Cheese" ) >>> product . number_sold = F ( "number_sold" ) + 1 >>> pr ... たい場合に望ましいでしょう。データベースで全てのモデルフィールドを更新しないようにすると、実行速度が少し向上します。例えば: product . name = "Name changed again" product . save ( update_fields = [ "name" ]) update_fields 引数は文字列を含む任意のイテラブル ...
https://man.mtool.work/django/6.1/ref/models/instances.html
Django 1.5 リリースノート — Django 6.1 ドキュメント 8321
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django 1.5 リリースノート ¶ February 26, 2013 Django 1.5 へようこそ! These release notes cover the new features , as well as some backwards incompat ... also the first release with Python 3 support ! We're labeling this support "experimental" because we don't yet consider it production-ready, but everything's in place for you to start porting your apps to Python 3. Our next release, Django 1.6, will sup ... plication will have all its dependencies satisfied under Python 3. Thus, we're recommending that Django 1.5 not be used in production under Python 3. Instead, use this opportunity to begin porting applications to Python 3. If you're an author of a plugg ... able component, we encourage you to start porting now. We plan to offer first-class, production-ready support for Python 3 in our next release, Django 1.6. Django 1.5 の新機能 ¶ Configurable User model ¶ In Django 1 ...
https://man.mtool.work/django/6.1/releases/1.5.html
Django 1.5 リリースノート — Django 6.1 ドキュメント 8321
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django 1.5 リリースノート ¶ February 26, 2013 Django 1.5 へようこそ! These release notes cover the new features , as well as some backwards incompat ... also the first release with Python 3 support ! We're labeling this support "experimental" because we don't yet consider it production-ready, but everything's in place for you to start porting your apps to Python 3. Our next release, Django 1.6, will sup ... plication will have all its dependencies satisfied under Python 3. Thus, we're recommending that Django 1.5 not be used in production under Python 3. Instead, use this opportunity to begin porting applications to Python 3. If you're an author of a plugg ... able component, we encourage you to start porting now. We plan to offer first-class, production-ready support for Python 3 in our next release, Django 1.6. Django 1.5 の新機能 ¶ Configurable User model ¶ In Django 1 ...
https://man.mtool.work/django/6.1/releases/1.5.html
Django の admin サイト — Django 6.1 ドキュメント 7909
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django の admin サイト ¶ Django のパワフルな特徴の1つは、自動的に生成される admin インタフェースです。あなたのモデルクラスからメタデータを読み取り、 ... E ) object_id = models . PositiveIntegerField () content_object = GenericForeignKey ( "content_type" , "object_id" ) class Product ( models . Model ): name = models . CharField ( max_length = 100 ) Product の追加/変更ビューで Image インスタンスの編集や作 ... o.contrib import admin from django.contrib.contenttypes.admin import GenericTabularInline from myapp.models import Image , Product class ImageInline ( GenericTabularInline ): model = Image class ProductAdmin ( admin . ModelAdmin ): inlines = [ ImageInli ... ne , ] admin . site . register ( Product , ProductAdmin ) 詳しくは contenttypes のドキュメント を参照してください。 カスタムのバリデーションを admin に追加する ¶ T ...
https://man.mtool.work/django/6.1/ref/contrib/admin/
Django の admin サイト — Django 6.1 ドキュメント 7909
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django の admin サイト ¶ Django のパワフルな特徴の1つは、自動的に生成される admin インタフェースです。あなたのモデルクラスからメタデータを読み取り、 ... E ) object_id = models . PositiveIntegerField () content_object = GenericForeignKey ( "content_type" , "object_id" ) class Product ( models . Model ): name = models . CharField ( max_length = 100 ) Product の追加/変更ビューで Image インスタンスの編集や作 ... o.contrib import admin from django.contrib.contenttypes.admin import GenericTabularInline from myapp.models import Image , Product class ImageInline ( GenericTabularInline ): model = Image class ProductAdmin ( admin . ModelAdmin ): inlines = [ ImageInli ... ne , ] admin . site . register ( Product , ProductAdmin ) 詳しくは contenttypes のドキュメント を参照してください。 カスタムのバリデーションを admin に追加する ¶ T ...
https://man.mtool.work/django/6.1/ref/contrib/admin/
表示形式のローカライズ — Django 6.1 ドキュメント 7841
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 表示形式のローカライズ ¶ 概要 ¶ Django の表示形式システムは、カレント ロケール に合った表示形式を使って日付、時刻、数値をテンプレート内で表示すること ... 。 フォームフィールドの入出力データをローカライズするには localize 引数を使います: class CashRegisterForm ( forms . Form ): product = forms . CharField () revenue = forms . DecimalField ( max_digits = 4 , decimal_places = 2 , localize = True ) Locale spe ...
https://man.mtool.work/django/6.1/topics/i18n/formatting.html
表示形式のローカライズ — Django 6.1 ドキュメント 7841
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 表示形式のローカライズ ¶ 概要 ¶ Django の表示形式システムは、カレント ロケール に合った表示形式を使って日付、時刻、数値をテンプレート内で表示すること ... 。 フォームフィールドの入出力データをローカライズするには localize 引数を使います: class CashRegisterForm ( forms . Form ): product = forms . CharField () revenue = forms . DecimalField ( max_digits = 4 , decimal_places = 2 , localize = True ) Locale spe ...
https://man.mtool.work/django/6.1/topics/i18n/formatting.html
PREV 1 2 NEXT