per page, with , order by , clip by
Results of 1 - 10 of about 70 for recent (0.057 sec.)
ページ分割 (Pagination) — Django 6.1 ドキュメント 12758
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » ページ分割 (Pagination) ¶ Django は、ページ分割 (ページネーション) されたデータを管理するための高レベルと低レベルの方法を提供しています。つまり、"前 ... False >>> page2 . 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 () ... his 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): ... Empt ... list import count next previous last ListView Contact contact pages range index span href QuerySet objects Traceback most recent call EmptyPage クイック検索 Last update: 2026年10月09日 « previous | up | next » ...
https://man.mtool.work/django/6.1/topics/pagination.html
Django's Tasks framework — Django 6.1 ドキュメント 10968
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django's Tasks framework ¶ New in Django 6.0: For older Django versions, the django-tasks backport is available. For a web application, there's ofte ... es are serialized to JSON, they must be JSON-serializable: >>> process_data . enqueue ( datetime . now ()) Traceback (most recent call last): ... TypeError : Object of type datetime is not JSON serializable Arguments must also be able to round-trip thr ... uble_dictionary . enqueue (( 1 , 2 , 3 )) >>> result . status FAILED >>> result . errors [ 0 ] . traceback Traceback (most recent call last): ... TypeError : unhashable type: 'list' The double_dictionary Task fails because after the JSON round-trip the ... shed executing, or has failed, ValueError is raised. >>> result . status RUNNING >>> result . return_value Traceback (most recent call last): ... ValueError : Task has not finished yet Errors ¶ If the Task doesn't succeed, and instead raises an excepti ...
https://man.mtool.work/django/6.1/topics/tasks.html
ページ分割 (Pagination) — Django 6.1 ドキュメント 10672
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » ページ分割 (Pagination) ¶ Django は、ページ分割 (ページネーション) されたデータを管理するための高レベルと低レベルの方法を提供しています。つまり、"前 ... False >>> page2 . 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 () ... his 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): ... Empt ...
https://man.mtool.work/django/6.1/topics/pagination.html
Django's Tasks framework — Django 6.1 ドキュメント 10672
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django's Tasks framework ¶ New in Django 6.0: For older Django versions, the django-tasks backport is available. For a web application, there's ofte ... es are serialized to JSON, they must be JSON-serializable: >>> process_data . enqueue ( datetime . now ()) Traceback (most recent call last): ... TypeError : Object of type datetime is not JSON serializable Arguments must also be able to round-trip thr ... uble_dictionary . enqueue (( 1 , 2 , 3 )) >>> result . status FAILED >>> result . errors [ 0 ] . traceback Traceback (most recent call last): ... TypeError : unhashable type: 'list' The double_dictionary Task fails because after the JSON round-trip the ... shed executing, or has failed, ValueError is raised. >>> result . status RUNNING >>> result . return_value Traceback (most recent call last): ... ValueError : Task has not finished yet Errors ¶ If the Task doesn't succeed, and instead raises an excepti ...
https://man.mtool.work/django/6.1/topics/tasks.html
はじめての Django アプリ作成、その 5 — Django 6.1 ドキュメント 8881
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » はじめての Django アプリ作成、その 5 ¶ このチュートリアルは チュートリアル 4 の続きです。Web 投票アプリケーションが完成したので、今度は自動テストを作 ... バグを見つけたとき ¶ 運よく、 polls のアプリケーションにはすぐに修正可能な小さなバグがありました。 Question.was_published_recently() のメソッドは Question が昨日以降に作成された場合に True を返すのですが(適切な動作)、 Question の pub_date が未来の日付 ... >>> future_question = Question ( pub_date = timezone . now () + datetime . timedelta ( days = 30 )) >>> # was it published recently? >>> future_question . was_published_recently () True 将来のことは「最近(recent)」ではないため、これは明らかに間違いで ... om django.utils import timezone from .models import Question class QuestionModelTests ( TestCase ): def test_was_published_recently_with_future_question ( self ): """ was_published_recently() returns False for questions whose pub_date is in the future. ...
https://man.mtool.work/django/6.1/intro/tutorial05.html
はじめての Django アプリ作成、その 5 — Django 6.1 ドキュメント 8881
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » はじめての Django アプリ作成、その 5 ¶ このチュートリアルは チュートリアル 4 の続きです。Web 投票アプリケーションが完成したので、今度は自動テストを作 ... バグを見つけたとき ¶ 運よく、 polls のアプリケーションにはすぐに修正可能な小さなバグがありました。 Question.was_published_recently() のメソッドは Question が昨日以降に作成された場合に True を返すのですが(適切な動作)、 Question の pub_date が未来の日付 ... >>> future_question = Question ( pub_date = timezone . now () + datetime . timedelta ( days = 30 )) >>> # was it published recently? >>> future_question . was_published_recently () True 将来のことは「最近(recent)」ではないため、これは明らかに間違いで ... om django.utils import timezone from .models import Question class QuestionModelTests ( TestCase ): def test_was_published_recently_with_future_question ( self ): """ was_published_recently() returns False for questions whose pub_date is in the future. ...
https://man.mtool.work/django/6.1/intro/tutorial05.html
フォーム フィールド — Django 6.1 ドキュメント 8585
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » フォーム フィールド ¶ class Field [ソース] ¶ Form クラスを作成時の一番重要な部分は、form のフィールド (field) の定義です。各フィールドにはカスタムの ... ilField () >>> f . clean ( "foo@example.com" ) 'foo@example.com' >>> f . clean ( "invalid email address" ) Traceback (most recent call last): ... ValidationError : ['Enter a valid email address.'] field のコアとなる引数 ¶ 各 Field クラスのコンストラクタ ... > from django import forms >>> f = forms . CharField () >>> f . clean ( "foo" ) 'foo' >>> f . clean ( "" ) Traceback (most recent call last): ... ValidationError : ['This field is required.'] >>> f . clean ( None ) Traceback (most recent call last): .. ... ーメッセージです: >>> from django import forms >>> generic = forms . CharField () >>> generic . clean ( "" ) Traceback (most recent call last): ... ValidationError : ['This field is required.'] そしてこれがカスタムエラーメッセージです: >>> name = forms . ...
https://man.mtool.work/django/6.1/ref/forms/fields.html
クエリ式 (Query Expression) — Django 6.1 ドキュメント 8585
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » クエリ式 (Query Expression) ¶ クエリ式 (query expression) は、update、create、filter、order by、annotation、またはaggregateの一部として使用できる値ま ... me import timedelta >>> from django.utils import timezone >>> one_day_ago = timezone . now () - timedelta ( days = 1 ) >>> recent_comments = Comment . objects . filter ( ... post = OuterRef ( "pk" ), ... created_at__gte = one_day_ago , ... ) >>> Post . ... objects . annotate ( recent_comment = Exists ( recent_comments )) PostgreSQLの場合、SQLは以下のようになります: SELECT "post" . "id" , "post" . "publis ... M "comment" U0 WHERE ( U0 . "created_at" >= YYYY - MM - DD HH : MM : SS AND U0 . "post_id" = "post" . "id" ) LIMIT 1 ) AS "recent_comment" FROM "post" Exists に単一のカラムの参照を強制する必要はありません。列は破棄され、真偽値の結果が返されるからです。 ...
https://man.mtool.work/django/6.1/ref/models/expressions.html
フォーム フィールド — Django 6.1 ドキュメント 8585
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » フォーム フィールド ¶ class Field [ソース] ¶ Form クラスを作成時の一番重要な部分は、form のフィールド (field) の定義です。各フィールドにはカスタムの ... ilField () >>> f . clean ( "foo@example.com" ) 'foo@example.com' >>> f . clean ( "invalid email address" ) Traceback (most recent call last): ... ValidationError : ['Enter a valid email address.'] field のコアとなる引数 ¶ 各 Field クラスのコンストラクタ ... > from django import forms >>> f = forms . CharField () >>> f . clean ( "foo" ) 'foo' >>> f . clean ( "" ) Traceback (most recent call last): ... ValidationError : ['This field is required.'] >>> f . clean ( None ) Traceback (most recent call last): .. ... ーメッセージです: >>> from django import forms >>> generic = forms . CharField () >>> generic . clean ( "" ) Traceback (most recent call last): ... ValidationError : ['This field is required.'] そしてこれがカスタムエラーメッセージです: >>> name = forms . ...
https://man.mtool.work/django/6.1/ref/forms/fields.html
クエリ式 (Query Expression) — Django 6.1 ドキュメント 8585
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » クエリ式 (Query Expression) ¶ クエリ式 (query expression) は、update、create、filter、order by、annotation、またはaggregateの一部として使用できる値ま ... me import timedelta >>> from django.utils import timezone >>> one_day_ago = timezone . now () - timedelta ( days = 1 ) >>> recent_comments = Comment . objects . filter ( ... post = OuterRef ( "pk" ), ... created_at__gte = one_day_ago , ... ) >>> Post . ... objects . annotate ( recent_comment = Exists ( recent_comments )) PostgreSQLの場合、SQLは以下のようになります: SELECT "post" . "id" , "post" . "publis ... M "comment" U0 WHERE ( U0 . "created_at" >= YYYY - MM - DD HH : MM : SS AND U0 . "post_id" = "post" . "id" ) LIMIT 1 ) AS "recent_comment" FROM "post" Exists に単一のカラムの参照を強制する必要はありません。列は破棄され、真偽値の結果が返されるからです。 ...
https://man.mtool.work/django/6.1/ref/models/expressions.html
PREV 1 2 3 4 5 6 7 NEXT