... te.py モジュールは管理コマンドとして利用できません。 closepoll.py モジュールには一つだけ満たすべき要件があります。それは、 BaseCommand クラスもしくはその サブクラス の一つを継承した Command クラスを定義することです。 スタンドアロンのスクリプト カスタム管理コ ... 装するには、 polls/management/commands/closepoll.py を以下のように編集してください: from django.core.management.base import BaseCommand , CommandError from polls.models import Question as Poll class Command ( BaseCommand ): help = "Closes the specified poll ... るように簡単に変更できます。これらのカスタムオプションは、次のように add_arguments() メソッドで追加できます: class Command ( BaseCommand ): def add_arguments ( self , parser ): # Positional arguments parser . add_argument ( "poll_ids" , nargs = "+" , type = i ... ... te.py モジュールは管理コマンドとして利用できません。 closepoll.py モジュールには一つだけ満たすべき要件があります。それは、 BaseCommand クラスもしくはその サブクラス の一つを継承した Command クラスを定義することです。 スタンドアロンのスクリプト カスタム管理コ ... 装するには、 polls/management/commands/closepoll.py を以下のように編集してください: from django.core.management.base import BaseCommand , CommandError from polls.models import Question as Poll class Command ( BaseCommand ): help = "Closes the specified poll ... るように簡単に変更できます。これらのカスタムオプションは、次のように add_arguments() メソッドで追加できます: class Command ( BaseCommand ): def add_arguments ( self , parser ): # Positional arguments parser . add_argument ( "poll_ids" , nargs = "+" , type = i ... ... のメソッド) (GeometryCollection のメソッド) (RelatedManager のメソッド) add_action() (AdminSite のメソッド) add_arguments() (BaseCommand のメソッド) (DiscoverRunner のクラスメソッド) add_constraint() (BaseDatabaseSchemaEditor のメソッド) add_error() (Form のメ ... get の属性) BaseArchiveIndexView (django.views.generic.dates のクラス) BaseBackend (django.contrib.auth.backends のクラス) BaseCommand (django.core.management のクラス) BaseConstraint (django.db.models のクラス) BaseDatabaseSchemaEditor (django.db.backends. ... ) check django-admin command check コマンドラインオプション --database --deploy --fail-level --list-tags --tag -t check() (BaseCommand のメソッド) check_for_language() (django.utils.translation モジュール) check_password() (django.contrib.auth.hashers モジュ ... ... のメソッド) (GeometryCollection のメソッド) (RelatedManager のメソッド) add_action() (AdminSite のメソッド) add_arguments() (BaseCommand のメソッド) (DiscoverRunner のクラスメソッド) add_constraint() (BaseDatabaseSchemaEditor のメソッド) add_error() (Form のメ ... get の属性) BaseArchiveIndexView (django.views.generic.dates のクラス) BaseBackend (django.contrib.auth.backends のクラス) BaseCommand (django.core.management のクラス) BaseConstraint (django.db.models のクラス) BaseDatabaseSchemaEditor (django.db.backends. ... ) check django-admin command check コマンドラインオプション --database --deploy --fail-level --list-tags --tag -t check() (BaseCommand のメソッド) check_for_language() (django.utils.translation モジュール) check_password() (django.contrib.auth.hashers モジュ ... ... uthenticated and User.is_anonymous properties to be compared using == , != , and | ( #26988 , #27154 ). Removed the broken BaseCommand.usage() method which was for optparse support ( #27000 ). Fixed a checks framework crash with an empty Meta.default_permis ... ... uthenticated and User.is_anonymous properties to be compared using == , != , and | ( #26988 , #27154 ). Removed the broken BaseCommand.usage() method which was for optparse support ( #27000 ). Fixed a checks framework crash with an empty Meta.default_permis ... ... オブジェクトを構築する場合は、 FileField に File のようなオブジェクトを代入できます: from django.core.management.base import BaseCommand from django.core.files.base import ContentFile class MyCommand ( BaseCommand ): def handle ( self , * args , ** options ): ... ... オブジェクトを構築する場合は、 FileField に File のようなオブジェクトを代入できます: from django.core.management.base import BaseCommand from django.core.files.base import ContentFile class MyCommand ( BaseCommand ): def handle ( self , * args , ** options ): ... ... 用して深いコピーを作成できないオブジェクトを TestCase.setUpTestData() のクラス属性に割り当てる機能のサポートは削除されます。 BaseCommand.requires_system_checks は真偽値をサポートしなくなります。 django.core.validators.EmailValidator の whitelist 引数と domain ... or custom management commands (replaced by argparse ). The class django.core.management.NoArgsCommand will be removed. Use BaseCommand instead, which takes no arguments by default. django.core.context_processors module will be removed. django.db.models.sql. ... hes instead. django.db.models.loading will be removed. Passing callable arguments to querysets will no longer be possible. BaseCommand.requires_model_validation will be removed in favor of requires_system_checks . Admin validators will be replaced by admin ... ... an now be called without an active database connection. In that case, check for a consistent migration history is skipped. BaseCommand.requires_system_checks now supports specifying a list of tags. System checks registered in the chosen tags will be checked ... g deep copies with copy.deepcopy() to class attributes in TestCase.setUpTestData() is deprecated. Using a boolean value in BaseCommand.requires_system_checks is deprecated. Use '__all__' instead of True , and [] (an empty list) instead of False . The whitel ... 2026年10月08日