per page, with , order by , clip by
Results of 1 - 10 of about 252 for order (0.008 sec.)
複合主キー — Django 6.1 ドキュメント 9422
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 複合主キー ¶ Django では、すべてのモデルに主キーが存在します。デフォルトでは、この主キーは単一のフィールドで構成されます。 ほとんどの場合、単一の主キ ... を CompositePrimaryKey に設定します: class Product ( models . Model ): name = models . CharField ( max_length = 100 ) class Order ( models . Model ): reference = models . CharField ( 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 ( Order , on_de ... . CASCADE ) quantity = models . IntegerField () これにより、Django はテーブル作成時に複合主キー( PRIMARY KEY (product_id, order_id) )を作成するようになります。 複合主キーは tuple (タプル)で表現されます: >>> product = Product . objects . create ( n ...
https://man.mtool.work/django/6.1/topics/composite-primary-key.html
複合主キー — Django 6.1 ドキュメント 9362
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 複合主キー ¶ Django では、すべてのモデルに主キーが存在します。デフォルトでは、この主キーは単一のフィールドで構成されます。 ほとんどの場合、単一の主キ ... を CompositePrimaryKey に設定します: class Product ( models . Model ): name = models . CharField ( max_length = 100 ) class Order ( models . Model ): reference = models . CharField ( 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 ( Order , on_de ... . CASCADE ) quantity = models . IntegerField () これにより、Django はテーブル作成時に複合主キー( PRIMARY KEY (product_id, order_id) )を作成するようになります。 複合主キーは tuple (タプル)で表現されます: >>> product = Product . objects . create ( n ...
https://man.mtool.work/django/6.1/topics/composite-primary-key.html
モデルの Meta オプション — Django 6.1 ドキュメント 9192
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » モデルの Meta オプション ¶ このドキュメントでは、モデル内部の class Meta 内でモデルに与えられる、すべての可能な メタデータオプション を説明します。 ... デル Manager の latest() と earliest() メソッドで使用するデフォルトのフィールドを指定します。 実装例: # Latest by ascending order_date. get_latest_by = "order_date" # Latest by priority descending, order_date ascending. get_latest_by = [ "-priority" , ... "order_date" ] 詳しくは latest() のドキュメントを参照してください。 managed ¶ Options. managed ¶ デフォルトは True です。つまり、 ... e を使って既存のモデルのコピーを作成することもできます。しかし、その場合はもっと良い方法があります。 プロキシモデル です。 order_with_respect_to ¶ Options. order_with_respect_to ¶ このオブジェクトを指定されたフィールドに対してソート可能にします。通常は ...
https://man.mtool.work/django/6.1/ref/models/options.html
モデルの Meta オプション — Django 6.1 ドキュメント 9132
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » モデルの Meta オプション ¶ このドキュメントでは、モデル内部の class Meta 内でモデルに与えられる、すべての可能な メタデータオプション を説明します。 ... デル Manager の latest() と earliest() メソッドで使用するデフォルトのフィールドを指定します。 実装例: # Latest by ascending order_date. get_latest_by = "order_date" # Latest by priority descending, order_date ascending. get_latest_by = [ "-priority" , ... "order_date" ] 詳しくは latest() のドキュメントを参照してください。 managed ¶ Options. managed ¶ デフォルトは True です。つまり、 ... e を使って既存のモデルのコピーを作成することもできます。しかし、その場合はもっと良い方法があります。 プロキシモデル です。 order_with_respect_to ¶ Options. order_with_respect_to ¶ このオブジェクトを指定されたフィールドに対してソート可能にします。通常は ...
https://man.mtool.work/django/6.1/ref/models/options.html
QuerySet API リファレンス — Django 6.1 ドキュメント 8912
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » QuerySet API リファレンス ¶ このドキュメントでは、 QuerySet API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提としてい ... のセクションで後ほど詳しく説明します。 QuerySet クラスは、イントロスペクションのために以下のパブリックな属性を持っています: ordered [ソース] ¶ True if the QuerySet is ordered — i.e. has an order_by() clause or a default ordering on the model. False oth ... erwise. totally_ordered [ソース] ¶ New in Django 6.1. Returns True if the QuerySet is ordered and the ordering is deterministic. This requires t ... hat the ordering includes a field (or set of fields) that is unique and non-nullable. For queries involving a GROUP BY clause, the model ...
https://man.mtool.work/django/6.1/ref/models/querysets.html
QuerySet API リファレンス — Django 6.1 ドキュメント 8912
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » QuerySet API リファレンス ¶ このドキュメントでは、 QuerySet API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提としてい ... のセクションで後ほど詳しく説明します。 QuerySet クラスは、イントロスペクションのために以下のパブリックな属性を持っています: ordered [ソース] ¶ True if the QuerySet is ordered — i.e. has an order_by() clause or a default ordering on the model. False oth ... erwise. totally_ordered [ソース] ¶ New in Django 6.1. Returns True if the QuerySet is ordered and the ordering is deterministic. This requires t ... hat the ordering includes a field (or set of fields) that is unique and non-nullable. For queries involving a GROUP BY clause, the model ...
https://man.mtool.work/django/6.1/ref/models/querysets.html
フォームセット (Formset) — Django 6.1 ドキュメント 8392
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » フォームセット (Formset) ¶ class BaseFormSet [ソース] ¶ フォームセットは、同じページで複数のフォームを扱うための抽象レイヤーです。データグリッドに例 ... ArticleFormSet = formset_factory ( ArticleForm , extra = 2 ) Formsets can be iterated and indexed, accessing forms in the order they were created. You can reorder the forms by overriding the default __iter__() and __getitem__() methods if needed. (Fo ... には、フォームセット内のフォームの順序およびフォームセットからのフォームの削除に役立つ 2 つのオプション引数があります。 can_order ¶ BaseFormSet. can_order ¶ デフォルト値: False 下記のように、ソート可能なフォームセットを作成できます: >>> from django.for ... ms import formset_factory >>> from myapp.forms import ArticleForm >>> ArticleFormSet = formset_factory ( ArticleForm , can_order = True ) >>> formset = ArticleFormSet ( ... initial = [ ... { "title" : "Article #1" , "pub_date" : datetime . date ( 2008 ...
https://man.mtool.work/django/6.1/topics/forms/formsets.html
フォームセット (Formset) — Django 6.1 ドキュメント 8392
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » フォームセット (Formset) ¶ class BaseFormSet [ソース] ¶ フォームセットは、同じページで複数のフォームを扱うための抽象レイヤーです。データグリッドに例 ... ArticleFormSet = formset_factory ( ArticleForm , extra = 2 ) Formsets can be iterated and indexed, accessing forms in the order they were created. You can reorder the forms by overriding the default __iter__() and __getitem__() methods if needed. (Fo ... には、フォームセット内のフォームの順序およびフォームセットからのフォームの削除に役立つ 2 つのオプション引数があります。 can_order ¶ BaseFormSet. can_order ¶ デフォルト値: False 下記のように、ソート可能なフォームセットを作成できます: >>> from django.for ... ms import formset_factory >>> from myapp.forms import ArticleForm >>> ArticleFormSet = formset_factory ( ArticleForm , can_order = True ) >>> formset = ArticleFormSet ( ... initial = [ ... { "title" : "Article #1" , "pub_date" : datetime . date ( 2008 ...
https://man.mtool.work/django/6.1/topics/forms/formsets.html
配信 (syndication) フィード フレームワーク — Django 6.1 ドキュメント 7882
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 配信 (syndication) フィード フレームワーク ¶ Django には、 RSS と Atom フィードを作成するための高レベルな配信 (syndication) フィード生成フレームワー ... " description = "Updates on changes and additions to police beat central." def items ( self ): return NewsItem . objects . order_by ( "-pub_date" )[: 5 ] def item_title ( self , item ): return item . title def item_description ( self , item ): return ... Feed ): title = "My articles" description_template = "feeds/articles.html" def items ( self ): return Article . objects . order_by ( "-pub_date" )[: 5 ] def get_context_data ( self , ** kwargs ): context = super () . get_context_data ( ** kwargs ) co ... ently reported in police beat %s " % obj . beat def items ( self , obj ): return Crime . objects . filter ( beat = obj ) . order_by ( "-crime_date" )[: 30 ] フィードの <title> , <link> , <description> を生成するために、 Django は title() , link() , de ...
https://man.mtool.work/django/6.1/ref/contrib/syndication.html
配信 (syndication) フィード フレームワーク — Django 6.1 ドキュメント 7822
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 配信 (syndication) フィード フレームワーク ¶ Django には、 RSS と Atom フィードを作成するための高レベルな配信 (syndication) フィード生成フレームワー ... " description = "Updates on changes and additions to police beat central." def items ( self ): return NewsItem . objects . order_by ( "-pub_date" )[: 5 ] def item_title ( self , item ): return item . title def item_description ( self , item ): return ... Feed ): title = "My articles" description_template = "feeds/articles.html" def items ( self ): return Article . objects . order_by ( "-pub_date" )[: 5 ] def get_context_data ( self , ** kwargs ): context = super () . get_context_data ( ** kwargs ) co ... ently reported in police beat %s " % obj . beat def items ( self , obj ): return Crime . objects . filter ( beat = obj ) . order_by ( "-crime_date" )[: 30 ] フィードの <title> , <link> , <description> を生成するために、 Django は title() , link() , de ...
https://man.mtool.work/django/6.1/ref/contrib/syndication.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT