... nd that Django substitutes during tests ), so can miss deprecation warnings that are only issued from the production email configuration. Consider running with deprecation warnings enabled in production to catch those deprecations. Or carefully review your co ... sword" : "password" , }, }, } The complete list of deprecated EMAIL_* settings and where they should be moved in a MAILERS configuration is: EMAIL_BACKEND becomes "BACKEND" . If your settings didn't define EMAIL_BACKEND , the default value was "django.core.ma ... il.backends.smtp.EmailBackend" (which is also the default if a MAILERS configuration doesn't specify the "BACKEND" ). EMAIL_FILE_PATH becomes "file_path" in "OPTIONS" (with "BACKEND" set to "django.core.mail ... ... ses Django's SMTP email backend , which sends using the standard SMTP protocol. This backend is useful for many production configurations, including SMTP servers in your own infrastructure and most commercial email service providers (ESPs). There are also thi ... development or testing you often don't want to send email at all. Django's test runner automatically overrides the MAILERS configuration to substitute Django's memory email backend . This prevents test cases from sending real email and gives them access to th ... erent services for transactional notifications and bulk marketing email, etc. The MAILERS setting can define multiple mail configurations. For example: import os MAILERS = { "default" : { "BACKEND" : "django.core.mail.backends.smtp.EmailBackend" , "OPTIONS" : ... ... ne of the bugs fixed in Django 1.2.4 involves a set of circumstances whereby a running a test suite on a multiple database configuration could cause the original source database (i.e., the actual production database) to be dropped, causing catastrophic loss o ... introduce a new setting -- TEST_DEPENDENCIES -- that allows you to define any creation order dependencies in your database configuration. Most users -- even users with multiple-database configurations -- need not be concerned about the data loss bug, or the m ... anual configuration of TEST_DEPENDENCIES . See the original problem report documentation on controlling the creation order of test databases f ... ... the web server to be properly configured; Django's documentation has for some time contained notes advising users on such configuration. Django's own built-in parsing of the Host header is, however, still vulnerable, as was reported to us recently. The Host ... ... an 'max_allowed_packet' bytes") Then the solution is to increase the value of the max_allowed_packet setting in your MySQL configuration. For example, the default value may be something low like one megabyte -- the setting may be modified in MySQL's configura ... ... the web server to be properly configured; Django's documentation has for some time contained notes advising users on such configuration. Django's own built-in parsing of the Host header is, however, still vulnerable, as was reported to us recently. The Host ... ... s in one run by using the option multiple times (#21488, #17181). Fixed a regression that unnecessarily triggered settings configuration when importing get_wsgi_application (#21486). Fixed test client logout() method when using the cookie-based session backen ... ... een refactored into an "app registry" where models modules no longer have a central role and where it's possible to attach configuration data to applications. Improvements thus far include: Applications can run code at startup, before Django does anything els ... e, with the ready() method of their configuration. Application labels are assigned correctly to models even when they're defined outside of models.py . You don't have to se ... entirely if an application doesn't have any models. Applications can be relabeled with the label attribute of application configurations, to work around label conflicts. The name of applications can be customized in the admin with the verbose_name of applica ... ... ass in their __init__.py . When the apps.py submodule exists and defines a single AppConfig subclass, Django now uses that configuration automatically, so you can remove default_app_config . default_app_config made it possible to declare only the application' ... on is disabled ( USE_I18N = False ) and localization is enabled ( USE_L10N = True ). After upgrading to Django 3.2 in such configurations, the first request to any previously cached value will be a cache miss. ForeignKey.validate() now uses _base_manager rath ... t related instances exist. When an application defines an AppConfig subclass in an apps.py submodule, Django now uses this configuration automatically, even if it isn't enabled with default_app_config . Set default = False in the AppConfig subclass if you nee ... ... st normalizes header names following WSGI conventions, mapping hyphens to underscores. As a result, even in configurations where reverse proxies carefully strip security-sensitive headers named with hyphens, such a header could be spoofed by su ... 0219 .) But under ASGI, there is not the same uniform expectation, even if many proxies protect against this under default configuration (including nginx via underscores_in_headers off; ). Headers containing underscores are now ignored by ASGIRequest , matchi ... 2026年10月08日