... ジの "To:" フィールドで他の受信者を見ることができます。 The following parameters are optional, and must be given as keyword arguments if used. fail_silently : A boolean, default False . If set True , send_mail() will suppress some errors during sending. (T ... あるため、 0 や 1 になることもあります)。 バージョン 6.0 で非推奨: Passing fail_silently and later parameters as positional arguments is deprecated. バージョン 6.1 で非推奨: The fail_silently , auth_user , auth_password , and connection arguments are depre ... ation. See Replacing fail_silently , Replacing auth_user and auth_password , and Replacing get_connection() and connection arguments . Changed in Django 6.1: using 引数が追加されました。 Older versions ignored fail_silently=True , auth_user , and auth_pas ... ... only for projects or reusable Django libraries that use these specific features: Replacing get_connection() and connection arguments Replacing fail_silently Migrating custom email backends Replacing auth_user and auth_password Updating AdminEmailHandler e ... _SSL_CERTFILE , EMAIL_SSL_KEYFILE , EMAIL_TIMEOUT , EMAIL_USE_SSL , EMAIL_USE_TLS mail.get_connection() and the connection arguments to mail functions The fail_silently argument to send_mail() , send_mass_mail() , mail_admins() , mail_managers() , and Ema ... ilMessage.send() The auth_user and auth_password arguments to send_mail() and send_mass_mail() The email_backend argument to AdminEmailHandler Migrating settings Often, the only cha ... ... unSQL now call the allow_migrate() method of database routers. The router can use the newly introduced app_label and hints arguments to make a routing decision. To take advantage of this feature you need to update the router to the new allow_migrate signa ... tribute. (This attribute was removed in 1.8.4 as it's no longer relevant.) Management commands that only accept positional arguments If you have written a custom management command that only accepts positional arguments and you didn't specify the args com ... mand variable, you might get an error like Error: unrecognized arguments: ... , as variable parsing is now based on argparse which doesn't implicitly accept positional arguments. You can make you ... ... ve been deprecated, to be replaced by pre_migrate and post_migrate respectively. These new signals have slightly different arguments. Check the documentation for details. The allow_syncdb method on database routers is now called allow_migrate , but still ... osite keys in future releases of Django, the Field API now has a new required method: deconstruct() . This method takes no arguments, and returns a tuple of four items: name : The field's attribute name on its parent model, or None if it is not part of a ... model path : A dotted, Python path to the class of this field, including the class name. args : Positional arguments, as a list kwargs : Keyword arguments, as a dict These four values allow any field to be serialized into a file, as well a ... ... ns now support serialization of zoneinfo.ZoneInfo instances. Serialization of deconstructible objects now supports keyword arguments with names that are not valid Python identifiers. モデル Constraints now implement a check() method that is already regist ... string with a ? , ensuring reliable link generation behavior. The querystring template tag now accepts multiple positional arguments, which must be mappings, such as QueryDict or dict . テスト The DiscoverRunner now supports parallel test execution on sys ... instances, so custom implementations should be idempotent and free of side effects. Features deprecated in 6.0 Positional arguments in django.core.mail APIs django.core.mail APIs now require keyword arguments for less commonly used parameters. Using posi ... ... ackend = 'default' , takes_context = False , ** kwargs ) [ソース] The @task decorator defines a Task instance. All keyword arguments are passed directly to the backend's task_class (which defaults to Task ). The following standard arguments are supported: ... aults to False . See Task context for details. Custom Task backends may define a custom task_class that accepts additional arguments. These can be passed through the @task decorator: @task ( foo = 5 , bar = 600 ) def my_task (): pass Changed in Django 6.1 ... sks for usage examples. enqueue ( * args , ** kwargs ) [ソース] Enqueues the Task to the Task backend for later execution. Arguments are passed to the Task 's function after a round-trip through a json.dumps() / json.loads() cycle. Hence, all arguments mu ... ... polls.models import Question as Poll class Command ( BaseCommand ): help = "Closes the specified poll for voting" def add_arguments ( self , parser ): parser . add_argument ( "poll_ids" , nargs = "+" , type = int ) def handle ( self , * args , ** options ... ションを受け入れることで、投票を閉じる代わりに削除するように簡単に変更できます。これらのカスタムオプションは、次のように add_arguments() メソッドで追加できます: class Command ( BaseCommand ): def add_arguments ( self , parser ): # Positional arguments parse ... r . add_argument ( "poll_ids" , nargs = "+" , type = int ) # Named (optional) arguments parser . add_argument ( "--delete" , action = "store_true" , help = "Delete poll instead of closing it" , ) def handle ( s ... ... t() no longer order by the primary key when a QuerySet 's ordering has been forcibly cleared by calling order_by() with no arguments. As default model ordering is now applied to combined querysets, union() , difference() , and intersection() raise Databas ... eError when a field in Options.ordering isn't selected by values() or values_list() . Call order_by() without arguments after combining to clear the default ordering. SQL SELECT aliases originating from QuerySet.annotate() calls as well as ta ... onal setting SIGNED_COOKIE_LEGACY_SALT_FALLBACK is now False . In cases where cached pages or template fragments varied on arguments, e.g. vary headers for cache_page() and UpdateCacheMiddleware , or the vary_on arguments to the cache template tag (genera ... ... y fields on the corresponding models, including across database-level relationships. This is implemented by passing lookup arguments in the querystring portion of the URL, and options on the ModelAdmin class allow developers to specify particular fields o ... ed feature has been the ability for a user with sufficient knowledge of a model's structure and the format of these lookup arguments to invent useful new filters on the fly by manipulating the querystring. However, it has been demonstrated that this can b ... information such as users' password hashes. To remedy this, django.contrib.admin will now validate that querystring lookup arguments either specify only fields on the model being viewed, or cross relations which have been explicitly allowed by the applica ... ... has async variants of all base methods. By convention, the asynchronous versions of all methods are prefixed with a . The arguments for both variants are the same. Retrieving backends Backends can be retrieved using the task_backends connection handler: ... = emails ) The return value of the decorator is a Task instance. Task attributes can be customized via the @task decorator arguments: from django.core.mail import send_mail from django.tasks import task @task ( priority = 2 , queue_name = "emails" ) def e ... ueing Tasks To add the Task to the queue store, so it will be executed, call the enqueue() method on it. If the Task takes arguments, these can be passed as-is. For example: result = email_users . enqueue ( emails = [ "user@example.com" ], subject = "You ... 2026年10月08日