... 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 モジュ ... ... 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 ): ... ... 用して深いコピーを作成できないオブジェクトを 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 ... ... e. For custom management commands: Verification of the presence of valid settings in commands that ask for it by using the BaseCommand.can_import_settings internal option is now performed independently from handling of the locale that should be active durin ... g the execution of the command. The latter can now be influenced by the new BaseCommand.leave_locale_alone internal option. See 管理コマンドとロケール for more details. The success_url of DeletionMixin is now i ... ... dded a warning to dumpdata if a proxy model is specified (which results in no output) without its concrete parent. The new BaseCommand.requires_migrations_checks attribute may be set to True if you want your command to print a warning, like runserver does, ... is removed. This may affect query counts tested by TransactionTestCase.assertNumQueries() . Support for skip_validation in BaseCommand.execute(**options) is removed. Use skip_checks (added in Django 1.7) instead. loaddata now raises a CommandError instead o ... ... ngo includes) will no longer convert null values back to an empty string. This is consistent with other backends. When the BaseCommand.leave_locale_alone attribute is False , translations are now deactivated instead of forcing the "en-us" locale. In the cas ... ls. django.core.management.NoArgsCommand The class NoArgsCommand is now deprecated and will be removed in Django 1.10. Use BaseCommand instead, which takes no arguments by default. Listing all migrations in a project The --list option of the migrate managem ... ... use pt translations. 管理コマンド The new inspectdb --include-views option allows creating models for database views. The BaseCommand class now uses a custom help formatter so that the standard options like --verbosity or --settings appear last in the help ... 2026年10月08日