per page, with , order by , clip by
Results of 1 - 10 of about 266 for first (0.008 sec.)
多対一 (many-to-one) 関係 — Django 6.1 ドキュメント 9742
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 多対一 (many-to-one) 関係 ¶ 多対一のリレーションシップを定義するには ForeignKey を使います。 この例では、 Reporter は複数の Article オブジェクトと関 ... le は一つの Reporter オブジェクトしか持つことができません: from django.db import models class Reporter ( models . Model ): first_name = models . CharField ( max_length = 30 ) last_name = models . CharField ( max_length = 30 ) email = models . EmailFie ... ld () def __str__ ( self ): return f " { self . first_name } { self . last_name } " class Article ( models . Model ): headline = models . CharField ( max_length = 100 ) pub_dat ... = [ "headline" ] 以下は、Python API の機能を使って実行できる操作の例です。 複数の Reporter を作成する: >>> r = Reporter ( first_name = "John" , last_name = "Smith" , email = "john@example.com" ) >>> r . save () >>> r2 = Reporter ( first_name = "Paul" ...
https://man.mtool.work/django/6.1/topics/db/examples/many_to_one.html
多対一 (many-to-one) 関係 — Django 6.1 ドキュメント 9663
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 多対一 (many-to-one) 関係 ¶ 多対一のリレーションシップを定義するには ForeignKey を使います。 この例では、 Reporter は複数の Article オブジェクトと関 ... le は一つの Reporter オブジェクトしか持つことができません: from django.db import models class Reporter ( models . Model ): first_name = models . CharField ( max_length = 30 ) last_name = models . CharField ( max_length = 30 ) email = models . EmailFie ... ld () def __str__ ( self ): return f " { self . first_name } { self . last_name } " class Article ( models . Model ): headline = models . CharField ( max_length = 100 ) pub_dat ... = [ "headline" ] 以下は、Python API の機能を使って実行できる操作の例です。 複数の Reporter を作成する: >>> r = Reporter ( first_name = "John" , last_name = "Smith" , email = "john@example.com" ) >>> r . save () >>> r2 = Reporter ( first_name = "Paul" ...
https://man.mtool.work/django/6.1/topics/db/examples/many_to_one.html
Django の admin サイト — Django 6.1 ドキュメント 8061
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django の admin サイト ¶ Django のパワフルな特徴の1つは、自動的に生成される admin インタフェースです。あなたのモデルクラスからメタデータを読み取り、 ... ます: fields フィールドセット内に表示するフィールド名のリストまたはタプルです。このキーは必須です。 実装例: { "fields" : [ "first_name" , "last_name" , "address" , "city" , "state" ], } fields オプションと同様に、複数のフィールドを 1 行に表示するにはタ ... プルでこれらのフィールドを囲んでください。この例では、 first_name と last_name フィールドが 1 つの行に表示されます。 { "fields" : [( "first_name" , "last_name" ), "address" , "city" , ... ンジリストページでどのフィールドを表示するかコントロールするために、 list_display をセットします。 実装例: list_display = [ "first_name" , "last_name" ] list_display をセットしない場合、admin サイトは各オブジェクトの __str__() 表現を表示する単一の列を表 ...
https://man.mtool.work/django/6.1/ref/contrib/admin/
Django の admin サイト — Django 6.1 ドキュメント 8061
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django の admin サイト ¶ Django のパワフルな特徴の1つは、自動的に生成される admin インタフェースです。あなたのモデルクラスからメタデータを読み取り、 ... ます: fields フィールドセット内に表示するフィールド名のリストまたはタプルです。このキーは必須です。 実装例: { "fields" : [ "first_name" , "last_name" , "address" , "city" , "state" ], } fields オプションと同様に、複数のフィールドを 1 行に表示するにはタ ... プルでこれらのフィールドを囲んでください。この例では、 first_name と last_name フィールドが 1 つの行に表示されます。 { "fields" : [( "first_name" , "last_name" ), "address" , "city" , ... ンジリストページでどのフィールドを表示するかコントロールするために、 list_display をセットします。 実装例: list_display = [ "first_name" , "last_name" ] list_display をセットしない場合、admin サイトは各オブジェクトの __str__() 表現を表示する単一の列を表 ...
https://man.mtool.work/django/6.1/ref/contrib/admin/
Python プログラマーのための Django テンプレート言語 — Django 6.1 ドキュメント 7904
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Python プログラマーのための Django テンプレート言語 ¶ この文書は Django テンプレートシステムがどのように動作し、どのように拡張するか、技術的な観点か ... ロジックです。以下はその例です: >>> from django.template import Context , Template >>> t = Template ( "My name is {{ person.first_name }}." ) >>> d = { "person" : { "first_name" : "Joe" , "last_name" : "Johnson" }} >>> t . render ( Context ( d )) "My n ... ame is Joe." >>> class PersonClass : ... pass ... >>> p = PersonClass () >>> p . first_name = "Ron" >>> p . last_name = "Nasty" >>> t . render ( Context ({ "person" : p })) "My name is Ron." >>> t = Template ( ... "The first stooge in the list is {{ stooges.0 }}." ) >>> c = Context ({ "stooges" : [ "Larry" , "Curly" , "Moe" ]}) >>> t . render ( ...
https://man.mtool.work/django/6.1/ref/templates/api.html
PostgreSQL 固有のモデルフィールド — Django 6.1 ドキュメント 7825
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » PostgreSQL 固有のモデルフィールド ¶ これらのフィールドは全て django.contrib.postgres.fields モジュールから利用できます。 これらのフィールドにインデッ ... れた値がデータの部分集合であるものです。これは SQL 演算子 @> を使用します。たとえば、: >>> Post . objects . create ( name = "First post" , tags = [ "thoughts" , "django" ]) >>> Post . objects . create ( name = "Second post" , tags = [ "thoughts" ]) >>> ... post" , tags = [ "tutorial" , "django" ]) >>> Post . objects . filter ( tags__contains = [ "thoughts" ]) <QuerySet [<Post: First post>, <Post: Second post>]> >>> Post . objects . filter ( tags__contains = [ "django" ]) <QuerySet [<Post: First post>, < ... Post: Third post>]> >>> Post . objects . filter ( tags__contains = [ "django" , "thoughts" ]) <QuerySet [<Post: First post>]> contained_by ¶ これは contains ルックアップの逆です。返されるオブジェクトは、データが渡された値の部分集合であるもの ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/fields.html
PostgreSQL 固有のモデルフィールド — Django 6.1 ドキュメント 7825
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » PostgreSQL 固有のモデルフィールド ¶ これらのフィールドは全て django.contrib.postgres.fields モジュールから利用できます。 これらのフィールドにインデッ ... れた値がデータの部分集合であるものです。これは SQL 演算子 @> を使用します。たとえば、: >>> Post . objects . create ( name = "First post" , tags = [ "thoughts" , "django" ]) >>> Post . objects . create ( name = "Second post" , tags = [ "thoughts" ]) >>> ... post" , tags = [ "tutorial" , "django" ]) >>> Post . objects . filter ( tags__contains = [ "thoughts" ]) <QuerySet [<Post: First post>, <Post: Second post>]> >>> Post . objects . filter ( tags__contains = [ "django" ]) <QuerySet [<Post: First post>, < ... Post: Third post>]> >>> Post . objects . filter ( tags__contains = [ "django" , "thoughts" ]) <QuerySet [<Post: First post>]> contained_by ¶ これは contains ルックアップの逆です。返されるオブジェクトは、データが渡された値の部分集合であるもの ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/fields.html
Python プログラマーのための Django テンプレート言語 — Django 6.1 ドキュメント 7677
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Python プログラマーのための Django テンプレート言語 ¶ この文書は Django テンプレートシステムがどのように動作し、どのように拡張するか、技術的な観点か ... ロジックです。以下はその例です: >>> from django.template import Context , Template >>> t = Template ( "My name is {{ person.first_name }}." ) >>> d = { "person" : { "first_name" : "Joe" , "last_name" : "Johnson" }} >>> t . render ( Context ( d )) "My n ... ame is Joe." >>> class PersonClass : ... pass ... >>> p = PersonClass () >>> p . first_name = "Ron" >>> p . last_name = "Nasty" >>> t . render ( Context ({ "person" : p })) "My name is Ron." >>> t = Template ( ... "The first stooge in the list is {{ stooges.0 }}." ) >>> c = Context ({ "stooges" : [ "Larry" , "Curly" , "Moe" ]}) >>> t . render ( ...
https://man.mtool.work/django/6.1/ref/templates/api.html
Coding style — Django 6.1 ドキュメント 7520
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Coding style ¶ Please follow these coding standards when writing code for inclusion in Django. Pre-commit checks ¶ pre-commit is a framework for man ... allows the reviewer to focus on the change itself, and it can also help to reduce the number of CI runs. To use the tool, first install pre-commit and then the git hooks: /  $ python -m pip install pre-commit $ pre-commit install ...\> py -m pip i ... nstall pre-commit ...\> pre-commit install On the first commit pre-commit will install the hooks, these are installed in their own environments and will take a short while to ins ... tall on the first run. Subsequent checks will be significantly faster. If an error is found an appropriate error message will be displayed. ...
https://man.mtool.work/django/6.1/internals/contributing/writing-code/coding-sty...
Django オブジェクトのシリアライズ — Django 6.1 ドキュメント 7520
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django オブジェクトのシリアライズ ¶ Django のシリアライズフレームワークは、Django のモデルを他のフォーマットに「翻訳」する仕組みを提供します。通常、 ... ped_object [ "model" ] def end_object ( self , obj ): dumped_object_str , model = self . get_dump_object ( obj ) if self . first : fields = [ field . name for field in apps . get_model ( model ) . _meta . fields ] header = "," . join ( fields ) self . ... ルキーのデシリアライズ ¶ 次の2つのモデルを考えてみてください。 from django.db import models class Person ( models . Model ): first_name = models . CharField ( max_length = 100 ) last_name = models . CharField ( max_length = 100 ) birthdate = models . Da ... teField () class Meta : constraints = [ models . UniqueConstraint ( fields = [ "first_name" , "last_name" ], name = "unique_first_last_name" , ), ] class Book ( models . Model ): name = models . CharField ( m ...
https://man.mtool.work/django/6.1/topics/serialization.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT