per page, with , order by , clip by
Results of 1 - 10 of about 1350 for last (0.005 sec.)
条件付きのビュー処理 — Django 6.1 ドキュメント 9069
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 条件付きのビュー処理 ¶ HTTP クライアントは、さまざまな HTTPヘッダーを送信することで、受信したリソースについてサーバーに伝えることができます。この方法 ... ) で利用できます。 Django がビューから送り返す各ページ (レスポンス) に対して、Django は2種類の HTTP ヘッダ、 ETag ヘッダと Last-Modified ヘッダを提供できます。これらのヘッダは HTTP レスポンス上ではオプションです。ヘッダはビュー関数で設定することも、 ... esource, it might send along a header such as either If-Modified-Since or If-Unmodified-Since , containing the date of the last modification time it was sent, or either If-Match or If-None-Match , containing the last ETag it was sent. If the current ... を計算して通常のビューを呼び出します。 condition デコレータのシグネチャは次のようになります。 condition ( etag_func = None , last_modified_func = None ) ETag と最終更新時間を計算するための2つの関数は、受信した request オブジェクトと、それらがサポートす ...
https://man.mtool.work/django/6.1/topics/conditional-view-processing.html
条件付きのビュー処理 — Django 6.1 ドキュメント 8986
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 条件付きのビュー処理 ¶ HTTP クライアントは、さまざまな HTTPヘッダーを送信することで、受信したリソースについてサーバーに伝えることができます。この方法 ... ) で利用できます。 Django がビューから送り返す各ページ (レスポンス) に対して、Django は2種類の HTTP ヘッダ、 ETag ヘッダと Last-Modified ヘッダを提供できます。これらのヘッダは HTTP レスポンス上ではオプションです。ヘッダはビュー関数で設定することも、 ... esource, it might send along a header such as either If-Modified-Since or If-Unmodified-Since , containing the date of the last modification time it was sent, or either If-Match or If-None-Match , containing the last ETag it was sent. If the current ... を計算して通常のビューを呼び出します。 condition デコレータのシグネチャは次のようになります。 condition ( etag_func = None , last_modified_func = None ) ETag と最終更新時間を計算するための2つの関数は、受信した request オブジェクトと、それらがサポートす ...
https://man.mtool.work/django/6.1/topics/conditional-view-processing.html
多対一 (many-to-one) 関係 — Django 6.1 ドキュメント 6377
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 多対一 (many-to-one) 関係 ¶ 多対一のリレーションシップを定義するには ForeignKey を使います。 この例では、 Reporter は複数の Article オブジェクトと関 ... ません: 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 . EmailField () def __str__ ( self ): return f " { self . fir ... st_name } { self . last_name } " class Article ( models . Model ): headline = models . CharField ( max_length = 100 ) pub_date = models . DateFiel ... 下は、Python API の機能を使って実行できる操作の例です。 複数の Reporter を作成する: >>> r = Reporter ( first_name = "John" , last_name = "Smith" , email = "john@example.com" ) >>> r . save () >>> r2 = Reporter ( first_name = "Paul" , last_name = "Jones ...
https://man.mtool.work/django/6.1/topics/db/examples/many_to_one.html
Django オブジェクトのシリアライズ — Django 6.1 ドキュメント 6031
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django オブジェクトのシリアライズ ¶ Django のシリアライズフレームワークは、Django のモデルを他のフォーマットに「翻訳」する仕組みを提供します。通常、 ... ださい。 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 . DateField () class Meta : constraints = [ models . Uni ... queConstraint ( fields = [ "first_name" , "last_name" ], name = "unique_first_last_name" , ), ] class Book ( models . Model ): name = models . CharField ( max_length = 10 ... on のデフォルトの Manager を get_by_natural_key() を使用して定義します。Person の場合、よいナチュラルキーは、first name と last name のペアになるでしょう。 from django.db import models class PersonManager ( models . Manager ): def get_by_natural_key ...
https://man.mtool.work/django/6.1/topics/serialization.html
Django オブジェクトのシリアライズ — Django 6.1 ドキュメント 6031
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django オブジェクトのシリアライズ ¶ Django のシリアライズフレームワークは、Django のモデルを他のフォーマットに「翻訳」する仕組みを提供します。通常、 ... ださい。 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 . DateField () class Meta : constraints = [ models . Uni ... queConstraint ( fields = [ "first_name" , "last_name" ], name = "unique_first_last_name" , ), ] class Book ( models . Model ): name = models . CharField ( max_length = 10 ... on のデフォルトの Manager を get_by_natural_key() を使用して定義します。Person の場合、よいナチュラルキーは、first name と last name のペアになるでしょう。 from django.db import models class PersonManager ( models . Manager ): def get_by_natural_key ...
https://man.mtool.work/django/6.1/topics/serialization.html
多対一 (many-to-one) 関係 — Django 6.1 ドキュメント 5855
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 多対一 (many-to-one) 関係 ¶ 多対一のリレーションシップを定義するには ForeignKey を使います。 この例では、 Reporter は複数の Article オブジェクトと関 ... ません: 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 . EmailField () def __str__ ( self ): return f " { self . fir ... st_name } { self . last_name } " class Article ( models . Model ): headline = models . CharField ( max_length = 100 ) pub_date = models . DateFiel ... 下は、Python API の機能を使って実行できる操作の例です。 複数の Reporter を作成する: >>> r = Reporter ( first_name = "John" , last_name = "Smith" , email = "john@example.com" ) >>> r . save () >>> r2 = Reporter ( first_name = "Paul" , last_name = "Jones ...
https://man.mtool.work/django/6.1/topics/db/examples/many_to_one.html
素の SQL 文の実行 — Django 6.1 ドキュメント 5855
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 素の SQL 文の実行 ¶ Django gives you three ways of performing raw SQL queries: you can embed raw SQL fragments into ORM queries using RawSQL (see Ra ... かりやすいでしょう。次のようなモデルがあるとします: class Person ( models . Model ): first_name = models . CharField ( ... ) last_name = models . CharField ( ... ) birth_date = models . DateField ( ... ) このとき、以下のように独自の SQL を実行できます: ... 重要ではありません。つまり、以下のクエリはどちらも同じように動作します: >>> Person . objects . raw ( "SELECT id, first_name, last_name, birth_date FROM myapp_person" ) >>> Person . objects . raw ( "SELECT last_name, birth_date, first_name, id FROM myap ... れば、簡単に Person のインスタンスにマッピングできます: >>> Person . objects . raw ( """ ... SELECT first AS first_name, ... last AS last_name, ... bd AS birth_date, ... pk AS id, ... FROM some_other_table ... """ ) ... 名称が一致している限り、そのモデ ...
https://man.mtool.work/django/6.1/topics/db/sql.html
素の SQL 文の実行 — Django 6.1 ドキュメント 5855
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 素の SQL 文の実行 ¶ Django gives you three ways of performing raw SQL queries: you can embed raw SQL fragments into ORM queries using RawSQL (see Ra ... かりやすいでしょう。次のようなモデルがあるとします: class Person ( models . Model ): first_name = models . CharField ( ... ) last_name = models . CharField ( ... ) birth_date = models . DateField ( ... ) このとき、以下のように独自の SQL を実行できます: ... 重要ではありません。つまり、以下のクエリはどちらも同じように動作します: >>> Person . objects . raw ( "SELECT id, first_name, last_name, birth_date FROM myapp_person" ) >>> Person . objects . raw ( "SELECT last_name, birth_date, first_name, id FROM myap ... れば、簡単に Person のインスタンスにマッピングできます: >>> Person . objects . raw ( """ ... SELECT first AS first_name, ... last AS last_name, ... bd AS birth_date, ... pk AS id, ... FROM some_other_table ... """ ) ... 名称が一致している限り、そのモデ ...
https://man.mtool.work/django/6.1/topics/db/sql.html
ページ分割 (Pagination) — Django 6.1 ドキュメント 5773
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » ページ分割 (Pagination) ¶ Django は、ページ分割 (ページネーション) されたデータを管理するための高レベルと低レベルの方法を提供しています。つまり、"前 ... ge2 . has_previous () True >>> page2 . has_other_pages () True >>> page2 . next_page_number () Traceback (most recent call last): ... EmptyPage : That page contains no results >>> page2 . previous_page_number () 1 >>> page2 . start_index () # The 1-b ... ased index of the first item on this page 3 >>> page2 . end_index () # The 1-based index of the last item on this page 4 >>> p . page ( 0 ) Traceback (most recent call last): ... EmptyPage : That page number is less than 1 ... >>> p . page ( 3 ) Traceback (most recent call last): ... EmptyPage : That page contains no results 注釈 Paginator には、リストやタプル、 Django の QuerySet 、 count() または ...
https://man.mtool.work/django/6.1/topics/pagination.html
ページ分割 (Pagination) — Django 6.1 ドキュメント 5685
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » ページ分割 (Pagination) ¶ Django は、ページ分割 (ページネーション) されたデータを管理するための高レベルと低レベルの方法を提供しています。つまり、"前 ... ge2 . has_previous () True >>> page2 . has_other_pages () True >>> page2 . next_page_number () Traceback (most recent call last): ... EmptyPage : That page contains no results >>> page2 . previous_page_number () 1 >>> page2 . start_index () # The 1-b ... ased index of the first item on this page 3 >>> page2 . end_index () # The 1-based index of the last item on this page 4 >>> p . page ( 0 ) Traceback (most recent call last): ... EmptyPage : That page number is less than 1 ... >>> p . page ( 3 ) Traceback (most recent call last): ... EmptyPage : That page contains no results 注釈 Paginator には、リストやタプル、 Django の QuerySet 、 count() または ...
https://man.mtool.work/django/6.1/topics/pagination.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT