... class ArchiveIndexView [ソース] ¶ "最新の"オブジェクトを、日付によって表示するトップレベルのインデックスページです。 allow_future を True にセットしない限り、 未来 の日付のオブジェクトは含まれません。 継承元 (MRO) django.views.generic.list.MultipleObje ... earArchiveView ¶ class YearArchiveView [ソース] ¶ 与えられた年の中で有効な月を表示する、年次のアーカイブページです。 allow_future を True にセットしない限り、 未来 の日付を伴うオブジェクトは表示されません。 継承元 (MRO) django.views.generic.list.Multip ... 可能なオブジェクトを持つ全ての月を含みます。 year : 与えられた年を表す date オブジェクト。 next_year : allow_empty と allow_future に従って、次の年の最初の日を表す date オブジェクト。 previous_year : date オブジェクト。 allow_empty と allow_future に従い ... ... class ArchiveIndexView [ソース] ¶ "最新の"オブジェクトを、日付によって表示するトップレベルのインデックスページです。 allow_future を True にセットしない限り、 未来 の日付のオブジェクトは含まれません。 継承元 (MRO) django.views.generic.list.MultipleObje ... earArchiveView ¶ class YearArchiveView [ソース] ¶ 与えられた年の中で有効な月を表示する、年次のアーカイブページです。 allow_future を True にセットしない限り、 未来 の日付を伴うオブジェクトは表示されません。 継承元 (MRO) django.views.generic.list.Multip ... 可能なオブジェクトを持つ全ての月を含みます。 year : 与えられた年を表す date オブジェクト。 next_year : allow_empty と allow_future に従って、次の年の最初の日を表す date オブジェクト。 previous_year : date オブジェクト。 allow_empty と allow_future に従い ... ... ll >>> import datetime >>> from django.utils import timezone >>> # create a Question instance with pub_date 30 days in the future >>> future_question = Question ( pub_date = timezone . now () + datetime . timedelta ( days = 30 )) >>> # was it published ... recently? >>> future_question . was_published_recently () True 将来のことは「最近(recent)」ではないため、これは明らかに間違いです。 バグをあぶ ... s 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. """ time = ti ... ... ll >>> import datetime >>> from django.utils import timezone >>> # create a Question instance with pub_date 30 days in the future >>> future_question = Question ( pub_date = timezone . now () + datetime . timedelta ( days = 30 )) >>> # was it published ... recently? >>> future_question . was_published_recently () True 将来のことは「最近(recent)」ではないため、これは明らかに間違いです。 バグをあぶ ... s 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. """ time = ti ... ... ビュー ¶ ArchiveIndexView ¶ class ArchiveIndexView ¶ 属性 (とオプションのアクセサ): allow_empty [ get_allow_empty() ] allow_future [ get_allow_future() ] content_type context_object_name [ get_context_object_name() ] date_field [ get_date_field() ] extr ... ) setup() YearArchiveView ¶ class YearArchiveView ¶ 属性 (とオプションのアクセサ): allow_empty [ get_allow_empty() ] allow_future [ get_allow_future() ] content_type context_object_name [ get_context_object_name() ] date_field [ get_date_field() ] extr ... setup() MonthArchiveView ¶ class MonthArchiveView ¶ 属性 (とオプションのアクセサ): allow_empty [ get_allow_empty() ] allow_future [ get_allow_future() ] content_type context_object_name [ get_context_object_name() ] date_field [ get_date_field() ] extr ... ... ビュー ¶ ArchiveIndexView ¶ class ArchiveIndexView ¶ 属性 (とオプションのアクセサ): allow_empty [ get_allow_empty() ] allow_future [ get_allow_future() ] content_type context_object_name [ get_context_object_name() ] date_field [ get_date_field() ] extr ... ) setup() YearArchiveView ¶ class YearArchiveView ¶ 属性 (とオプションのアクセサ): allow_empty [ get_allow_empty() ] allow_future [ get_allow_future() ] content_type context_object_name [ get_context_object_name() ] date_field [ get_date_field() ] extr ... setup() MonthArchiveView ¶ class MonthArchiveView ¶ 属性 (とオプションのアクセサ): allow_empty [ get_allow_empty() ] allow_future [ get_allow_future() ] content_type context_object_name [ get_context_object_name() ] date_field [ get_date_field() ] extr ... ... ext_year ( date ) [ソース] ¶ 指定した日付の翌年の最初の日を含む日付オブジェクトを返します。この関数は allow_empty と allow_future の値によって None を返したり、 Http404 例外を発生させたりします。 get_previous_year ( date ) [ソース] ¶ 指定した日付の前の ... 年の最初の日を含む日付オブジェクトを返します。この関数は allow_empty と allow_future の値によって None を返したり、 Http404 例外を発生させたりします。 MonthMixin ¶ class MonthMixin [ソース] ¶ 日付の「月」コン ... get_next_month ( date ) [ソース] ¶ 指定した日付の翌月初日を含む日付オブジェクトを返します。この関数は allow_empty と allow_future の値によって None を返したり、 Http404 例外が発生したりします。 get_previous_month ( date ) [ソース] ¶ 指定した日付の前の月 ... ... ext_year ( date ) [ソース] ¶ 指定した日付の翌年の最初の日を含む日付オブジェクトを返します。この関数は allow_empty と allow_future の値によって None を返したり、 Http404 例外を発生させたりします。 get_previous_year ( date ) [ソース] ¶ 指定した日付の前の ... 年の最初の日を含む日付オブジェクトを返します。この関数は allow_empty と allow_future の値によって None を返したり、 Http404 例外を発生させたりします。 MonthMixin ¶ class MonthMixin [ソース] ¶ 日付の「月」コン ... get_next_month ( date ) [ソース] ¶ 指定した日付の翌月初日を含む日付オブジェクトを返します。この関数は allow_empty と allow_future の値によって None を返したり、 Http404 例外が発生したりします。 get_previous_month ( date ) [ソース] ¶ 指定した日付の前の月 ... ... ons. However, we're also releasing 0.96 now because we have a set of backwards-incompatible changes scheduled for the near future. Once completed, they will involve some code changes for application developers, so we recommend that you stick with Djang ... dered deprecated; aside from any necessary security fixes, it will not be actively maintained, and it will be removed in a future release of Django. Also, note that some features, like the new DATABASE_OPTIONS setting (see the databases documentation f ... st ), info )) Note that both syntaxes (strings and callables) are valid, and will continue to be valid for the foreseeable future. テストフレームワーク ¶ Django now includes a test framework so you can start transmuting fear into boredom (with apologie ... ... ons. However, we're also releasing 0.96 now because we have a set of backwards-incompatible changes scheduled for the near future. Once completed, they will involve some code changes for application developers, so we recommend that you stick with Djang ... dered deprecated; aside from any necessary security fixes, it will not be actively maintained, and it will be removed in a future release of Django. Also, note that some features, like the new DATABASE_OPTIONS setting (see the databases documentation f ... st ), info )) Note that both syntaxes (strings and callables) are valid, and will continue to be valid for the foreseeable future. テストフレームワーク ¶ Django now includes a test framework so you can start transmuting fear into boredom (with apologie ... 2026年10月08日