... requests would not be redirected to HTTPS in accordance with SECURE_SSL_REDIRECT . HttpRequest.scheme now respects SECURE_PROXY_SSL_HEADER , if it is configured, and the appropriate header is set on the request, for both HTTP and HTTPS requests. If y ... ou deploy Django behind a reverse-proxy that forwards HTTP requests, and that connects to Django via HTTPS, be sure to verify that your application correctly hand ... ... requests would not be redirected to HTTPS in accordance with SECURE_SSL_REDIRECT . HttpRequest.scheme now respects SECURE_PROXY_SSL_HEADER , if it is configured, and the appropriate header is set on the request, for both HTTP and HTTPS requests. If y ... ou deploy Django behind a reverse-proxy that forwards HTTP requests, and that connects to Django via HTTPS, be sure to verify that your application correctly hand ... ... ting via HTTPS When deployed behind a reverse-proxy connecting to Django via HTTPS, django.http.HttpRequest.scheme would incorrectly detect client requests made via HTTP as u ... requests would not be redirected to HTTPS in accordance with SECURE_SSL_REDIRECT . HttpRequest.scheme now respects SECURE_PROXY_SSL_HEADER , if it is configured, and the appropriate header is set on the request, for both HTTP and HTTPS requests. If y ... ou deploy Django behind a reverse-proxy that forwards HTTP requests, and that connects to Django via HTTPS, be sure to verify that your application correctly hand ... ... drFromForwardedFor -- which updated the value of REMOTE_ADDR based on the HTTP X-Forwarded-For header commonly set by some proxy configurations. It has been demonstrated that this mechanism cannot be made reliable enough for general-purpose use, and t ... upgrade path is: Examine the code as it existed before it was removed . Verify that it works correctly with your upstream proxy, modifying it to support your particular proxy (if necessary). Introduce your modified version of SetRemoteAddrFromForward ... ted by some other means. For more details, see the documentation for the managed option. プロキシモデル You can now create proxy models : subclasses of existing models that only add Python-level (rather than database-level) behavior and aren't represe ... ... as'). Use this instead: import operator class A : ... alias = property ( operator . attrgetter ( "base" )) Permissions for proxy models Permissions for proxy models are now created using the content type of the proxy model rather than the content type ... ete model. A migration will update existing permissions when you run migrate . In the admin, the change is transparent for proxy models having the same app_label as their concrete model. However, in older versions, users with permissions for a proxy m ... couldn't access the model in the admin. That's now fixed, but you might want to audit the permissions assignments for such proxy models ( [add|view|change|delete]_myproxy ) prior to upgrading to ensure the new access is appropriate. Finally, proxy mod ... ... MEOUT environment variable ( #30361 ). Fixed a regression in Django 2.2 that caused a crash when migrating permissions for proxy models if the target permissions already existed. For example, when a permission had been created manually or a model had ... been migrated from concrete to proxy ( #30351 ). Fixed a regression in Django 2.2 that caused a crash of runserver when URLConf modules raised exceptions ( #30 ... ... t if a header is used in a security-sensitive way (for instance, passing authentication information along from a front-end proxy), even if the proxy carefully strips any incoming value for X-Auth-User , an attacker may be able to provide an X-Auth_Use ... ... t if a header is used in a security-sensitive way (for instance, passing authentication information along from a front-end proxy), even if the proxy carefully strips any incoming value for X-Auth-User , an attacker may be able to provide an X-Auth_Use ... ... tion lets you run a command as Django and exit, instead of opening the interactive shell. Added a warning to dumpdata if a proxy model is specified (which results in no output) without its concrete parent. The new BaseCommand.requires_migrations_check ... The pre_migrate() and post_migrate() signals now dispatch their migration plan and apps . モデル Reverse foreign keys from proxy models are now propagated to their concrete class. The reverse relation attached by a ForeignKey pointing to a proxy model ... lic API. QuerySet.bulk_create() sets the primary key on objects when using PostgreSQL. Added the Cast database function. A proxy model may now inherit multiple proxy models that share a common non-abstract parent class. Added Extract functions to extr ... ... t if a header is used in a security-sensitive way (for instance, passing authentication information along from a front-end proxy), even if the proxy carefully strips any incoming value for X-Auth-User , an attacker may be able to provide an X-Auth_Use ... 2026年10月08日