... isable delete selected admin . site . disable_action ( "delete_selected" ) # This ModelAdmin will not have delete_selected available class SomeModelAdmin ( admin . ModelAdmin ): actions = [ "some_other_action" ] ... # This one will class AnotherModelAdmin ... published ( modeladmin , request , queryset ): queryset . update ( status = "p" ) The make_published() action will only be available to users that pass the ModelAdmin.has_change_permission() check when it is called with obj=None . もし permissions が複数の ... ssion ( request , obj = obj ): obj . status = "p" obj . save ( update_fields = [ "status" ]) Controlling where actions are available ¶ New in Django 6.1. By default, admin actions are available on the change list page only. You can control where an action ... ... isable delete selected admin . site . disable_action ( "delete_selected" ) # This ModelAdmin will not have delete_selected available class SomeModelAdmin ( admin . ModelAdmin ): actions = [ "some_other_action" ] ... # This one will class AnotherModelAdmin ... published ( modeladmin , request , queryset ): queryset . update ( status = "p" ) The make_published() action will only be available to users that pass the ModelAdmin.has_change_permission() check when it is called with obj=None . もし permissions が複数の ... ssion ( request , obj = obj ): obj . status = "p" obj . save ( update_fields = [ "status" ]) Controlling where actions are available ¶ New in Django 6.1. By default, admin actions are available on the change list page only. You can control where an action ... ... n. However, it has been reported to us that even with the recommended web server configurations there are still techniques available for tricking many common web servers into supplying the application with an incorrect and possibly malicious Host header. ... ff these attack avenues. These issues in the Python standard library are CVE-2013-1664 and CVE-2013-1665. More information available from the Python security team . Django's XML serializer does not create documents with a DTD, so this should not cause any ... limit the form-count data provided by the client in a formset's management form, making it possible to exhaust a server's available memory by forcing it to create very large numbers of forms. In Django 1.3.6, all formsets have a strictly-enforced maximum ... ... n. However, it has been reported to us that even with the recommended web server configurations there are still techniques available for tricking many common web servers into supplying the application with an incorrect and possibly malicious Host header. ... ff these attack avenues. These issues in the Python standard library are CVE-2013-1664 and CVE-2013-1665. More information available from the Python security team . Django's XML serializer does not create documents with a DTD, so this should not cause any ... limit the form-count data provided by the client in a formset's management form, making it possible to exhaust a server's available memory by forcing it to create very large numbers of forms. In Django 1.4.4, all formsets have a strictly-enforced maximum ... ... und. This allows background Task functionality to be slowly added to an application, before the required infrastructure is available. To use it, set BACKEND to "django.tasks.backends.immediate.ImmediateBackend" : TASKS = { "default" : { "BACKEND" : "djang ... testing only. Production systems should rely on backends that supply a worker process and a durable queue implementation. Available third-party backends are listed on the Community Ecosystem page and the Tasks framework grid from Django Packages . To use ... s task_backends [ "default" ] # The default backend task_backends [ "reserve" ] # Another backend The "default" backend is available as default_task_backend : from django.tasks import default_task_backend Defining Tasks ¶ Tasks are defined using the djang ... ... n. However, it has been reported to us that even with the recommended web server configurations there are still techniques available for tricking many common web servers into supplying the application with an incorrect and possibly malicious Host header. ... ff these attack avenues. These issues in the Python standard library are CVE-2013-1664 and CVE-2013-1665. More information available from the Python security team . Django's XML serializer does not create documents with a DTD, so this should not cause any ... limit the form-count data provided by the client in a formset's management form, making it possible to exhaust a server's available memory by forcing it to create very large numbers of forms. In Django 1.3.6, all formsets have a strictly-enforced maximum ... ... n. However, it has been reported to us that even with the recommended web server configurations there are still techniques available for tricking many common web servers into supplying the application with an incorrect and possibly malicious Host header. ... ff these attack avenues. These issues in the Python standard library are CVE-2013-1664 and CVE-2013-1665. More information available from the Python security team . Django's XML serializer does not create documents with a DTD, so this should not cause any ... limit the form-count data provided by the client in a formset's management form, making it possible to exhaust a server's available memory by forcing it to create very large numbers of forms. In Django 1.4.4, all formsets have a strictly-enforced maximum ... ... . マイナーな機能 ¶ django.contrib.admin ¶ The admin site login view now redirects authenticated users to the next URL, if available, instead of always redirecting to the admin index page. The admin's FilteredSelectMultiple widget now uses <optgroup> s to ... s on related models. The new location keyword argument of the action() decorator specifies which admin views the action is available on. The action is available on the admin change list page by default. It can also be available on the admin change form. S ... ee Controlling where actions are available for details. The new description_plural keyword argument of the action() decorator specifies a human-readable description ... ... . マイナーな機能 ¶ django.contrib.admin ¶ The admin site login view now redirects authenticated users to the next URL, if available, instead of always redirecting to the admin index page. The admin's FilteredSelectMultiple widget now uses <optgroup> s to ... s on related models. The new location keyword argument of the action() decorator specifies which admin views the action is available on. The action is available on the admin change list page by default. It can also be available on the admin change form. S ... ee Controlling where actions are available for details. The new description_plural keyword argument of the action() decorator specifies a human-readable description ... ... odified version of SetRemoteAddrFromForwardedFor as a piece of middleware in your own project. Names of uploaded files are available later ¶ In Django 1.0, files uploaded and stored in a model's FileField were saved to disk before the model was saved to t ... he database. This meant that the actual file name assigned to the file was available before saving. For example, it was available in a model's pre-save signal handler. In Django 1.1 the file is saved as part ... he aggregate directly, or else annotate the objects in a QuerySet with the results of the aggregate query. This feature is available as new aggregate() and annotate() methods, and is covered in detail in the ORM aggregation documentation . Query expressio ... 2026年10月08日