per page, with , order by , clip by
Results of 1 - 10 of about 46 for John (0.007 sec.)
多対一 (many-to-one) 関係 — Django 6.1 ドキュメント 14523
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 多対一 (many-to-one) 関係 ¶ 多対一のリレーションシップを定義するには ForeignKey を使います。 この例では、 Reporter は複数の Article オブジェクトと関 ... " ] 以下は、Python API の機能を使って実行できる操作の例です。 複数の Reporter を作成する: >>> r = Reporter ( first_name = "John" , last_name = "Smith" , email = "john@example.com" ) >>> r . save () >>> r2 = Reporter ( first_name = "Paul" , last_name ... t" , pub_date = date ( 2005 , 7 , 27 ), reporter = r ) >>> a . save () >>> a . reporter . id 1 >>> a . reporter <Reporter: John Smith> オブジェクトを外部キーリレーションシップに代入する前に保存する必要があることに注意してください。たとえば、保存されて ... いない Reporter で Article を作成すると、次のように ValueError が発生します。 >>> r3 = Reporter ( first_name = "John" , last_name = "Smith" , email = "john@example.com" ) >>> Article . objects . create ( ... headline = "This is a test" , p ...
https://man.mtool.work/django/6.1/topics/db/examples/many_to_one.html
多対一 (many-to-one) 関係 — Django 6.1 ドキュメント 14523
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 多対一 (many-to-one) 関係 ¶ 多対一のリレーションシップを定義するには ForeignKey を使います。 この例では、 Reporter は複数の Article オブジェクトと関 ... " ] 以下は、Python API の機能を使って実行できる操作の例です。 複数の Reporter を作成する: >>> r = Reporter ( first_name = "John" , last_name = "Smith" , email = "john@example.com" ) >>> r . save () >>> r2 = Reporter ( first_name = "Paul" , last_name ... t" , pub_date = date ( 2005 , 7 , 27 ), reporter = r ) >>> a . save () >>> a . reporter . id 1 >>> a . reporter <Reporter: John Smith> オブジェクトを外部キーリレーションシップに代入する前に保存する必要があることに注意してください。たとえば、保存されて ... いない Reporter で Article を作成すると、次のように ValueError が発生します。 >>> r3 = Reporter ( first_name = "John" , last_name = "Smith" , email = "john@example.com" ) >>> Article . objects . create ( ... headline = "This is a test" , p ...
https://man.mtool.work/django/6.1/topics/db/examples/many_to_one.html
Django の概要 — Django 6.1 ドキュメント 8879
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django の概要 ¶ Django は変転の激しいニュースルーム環境で開発された経緯から、よくある Web 開発タスクを迅速かつ簡単化するように設計されています。ここ ... in the system yet. >>> Reporter . objects . all () <QuerySet []> # Create a new Reporter. >>> r = Reporter ( full_name = "John Smith" ) # Save the object into the database. You have to call save() explicitly. >>> r . save () # Now it has an ID. >>> ... r . id 1 # Now the new reporter is in the database. >>> Reporter . objects . all () <QuerySet [<Reporter: John Smith>]> # Fields are represented as attributes on the Python object. >>> r . full_name 'John Smith' # Django provides a r ... ich database lookup API. >>> Reporter . objects . get ( id = 1 ) <Reporter: John Smith> >>> Reporter . objects . get ( full_name__startswith = "John" ) <Reporter: John Smith> >>> Reporter . objects . get ...
https://man.mtool.work/django/6.1/intro/overview.html
Django の概要 — Django 6.1 ドキュメント 8879
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django の概要 ¶ Django は変転の激しいニュースルーム環境で開発された経緯から、よくある Web 開発タスクを迅速かつ簡単化するように設計されています。ここ ... in the system yet. >>> Reporter . objects . all () <QuerySet []> # Create a new Reporter. >>> r = Reporter ( full_name = "John Smith" ) # Save the object into the database. You have to call save() explicitly. >>> r . save () # Now it has an ID. >>> ... r . id 1 # Now the new reporter is in the database. >>> Reporter . objects . all () <QuerySet [<Reporter: John Smith>]> # Fields are represented as attributes on the Python object. >>> r . full_name 'John Smith' # Django provides a r ... ich database lookup API. >>> Reporter . objects . get ( id = 1 ) <Reporter: John Smith> >>> Reporter . objects . get ( full_name__startswith = "John" ) <Reporter: John Smith> >>> Reporter . objects . get ...
https://man.mtool.work/django/6.1/intro/overview.html
ウィジェット — Django 6.1 ドキュメント 7841
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » ウィジェット ¶ ウィジェットは、Django が HTML の input 要素の表現方法です。ウィジェットは、HTML のレンダリングをコントロールして、ウィジェットに合致 ... MultiWidget , TextInput >>> widget = MultiWidget ( widgets = [ TextInput , TextInput ]) >>> widget . render ( "name" , [ "john" , "paul" ]) '<input type="text" name="name_0" value="john"><input type="text" name="name_1" value="paul">' 各サブウィジェ ... す。例えば: >>> widget = MultiWidget ( widgets = { "" : TextInput , "last" : TextInput }) >>> widget . render ( "name" , [ "john" , "paul" ]) '<input type="text" name="name" value="john"><input type="text" name="name_last" value="paul">' それと、1 つの ... div class = "myradio" > < label for = "id_beatles_0" >< input id = "id_beatles_0" name = "beatles" type = "radio" value = "john" required > John </ label > </ div > < div class = "myradio" > < label for = "id_beatles_1" >< input id = "id_beatles_1" n ...
https://man.mtool.work/django/6.1/ref/forms/widgets.html
ウィジェット — Django 6.1 ドキュメント 7841
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » ウィジェット ¶ ウィジェットは、Django が HTML の input 要素の表現方法です。ウィジェットは、HTML のレンダリングをコントロールして、ウィジェットに合致 ... MultiWidget , TextInput >>> widget = MultiWidget ( widgets = [ TextInput , TextInput ]) >>> widget . render ( "name" , [ "john" , "paul" ]) '<input type="text" name="name_0" value="john"><input type="text" name="name_1" value="paul">' 各サブウィジェ ... す。例えば: >>> widget = MultiWidget ( widgets = { "" : TextInput , "last" : TextInput }) >>> widget . render ( "name" , [ "john" , "paul" ]) '<input type="text" name="name" value="john"><input type="text" name="name_last" value="paul">' それと、1 つの ... div class = "myradio" > < label for = "id_beatles_0" >< input id = "id_beatles_0" name = "beatles" type = "radio" value = "john" required > John </ label > </ div > < div class = "myradio" > < label for = "id_beatles_1" >< input id = "id_beatles_1" n ...
https://man.mtool.work/django/6.1/ref/forms/widgets.html
モデルに初期データを投入する — Django 6.1 ドキュメント 7795
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » モデルに初期データを投入する ¶ It's sometimes useful to prepopulate your database with hardcoded data when you're first setting up an app. You can p ... モデルのフィクスチャをJSONで書くと次のようになります: [ { "model" : "myapp.person" , "pk" : 1 , "fields" : { "first_name" : "John" , "last_name" : "Lennon" } }, { "model" : "myapp.person" , "pk" : 2 , "fields" : { "first_name" : "Paul" , "last_name" : ... "McCartney" } } ] YAML のフィクスチャだと以下のようになります: - model : myapp.person pk : 1 fields : first_name : John last_name : Lennon - model : myapp.person pk : 2 fields : first_name : Paul last_name : McCartney このデータは、アプリケー ... erson fields last 初期 ロード 方法 アプリケーション モデル マイグレーション アプリ 自動的 manage ドキュメント シリアライズ John クイック検索 Last update: 2026年10月09日 « previous | up | next » ...
https://man.mtool.work/django/6.1/howto/initial-data.html
データベース関数 — Django 6.1 ドキュメント 7536
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » データベース関数 ¶ The classes documented below provide a way for users to use functions provided by the underlying database as annotations, aggrega ... 文字小文字を区別せずにフィルタリングする場合、以下のようにします: >>> Author . objects . filter ( name = Collate ( Value ( "john" ), "nocase" )) <QuerySet [<Author: John>, <Author: john>]> また、PostgreSQLなどでのソートにも使用できます: >>> Author . o ... from django.db.models import Value >>> from django.db.models.functions import LPad >>> Author . objects . create ( name = "John" , alias = "j" ) >>> Author . objects . update ( name = LPad ( "name" , 8 , Value ( "abc" ))) 1 >>> print ( Author . objec ... ts . get ( alias = "j" ) . name ) abcaJohn LTrim ¶ class LTrim ( expression , ** extra ) [ソース] ¶ Trim と似ていますが、先頭の空白だけを取り除きます。 MD5 ¶ class M ...
https://man.mtool.work/django/6.1/ref/models/database-functions.html
データベース関数 — Django 6.1 ドキュメント 7536
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » データベース関数 ¶ The classes documented below provide a way for users to use functions provided by the underlying database as annotations, aggrega ... 文字小文字を区別せずにフィルタリングする場合、以下のようにします: >>> Author . objects . filter ( name = Collate ( Value ( "john" ), "nocase" )) <QuerySet [<Author: John>, <Author: john>]> また、PostgreSQLなどでのソートにも使用できます: >>> Author . o ... from django.db.models import Value >>> from django.db.models.functions import LPad >>> Author . objects . create ( name = "John" , alias = "j" ) >>> Author . objects . update ( name = LPad ( "name" , 8 , Value ( "abc" ))) 1 >>> print ( Author . objec ... ts . get ( alias = "j" ) . name ) abcaJohn LTrim ¶ class LTrim ( expression , ** extra ) [ソース] ¶ Trim と似ていますが、先頭の空白だけを取り除きます。 MD5 ¶ class M ...
https://man.mtool.work/django/6.1/ref/models/database-functions.html
モデルに初期データを投入する — Django 6.1 ドキュメント 7490
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » モデルに初期データを投入する ¶ It's sometimes useful to prepopulate your database with hardcoded data when you're first setting up an app. You can p ... モデルのフィクスチャをJSONで書くと次のようになります: [ { "model" : "myapp.person" , "pk" : 1 , "fields" : { "first_name" : "John" , "last_name" : "Lennon" } }, { "model" : "myapp.person" , "pk" : 2 , "fields" : { "first_name" : "Paul" , "last_name" : ... "McCartney" } } ] YAML のフィクスチャだと以下のようになります: - model : myapp.person pk : 1 fields : first_name : John last_name : Lennon - model : myapp.person pk : 2 fields : first_name : Paul last_name : McCartney このデータは、アプリケー ...
https://man.mtool.work/django/6.1/howto/initial-data.html
PREV 1 2 3 4 5 NEXT