... 表示しない、または許可しないようにします。 条件付きでアクションを有効/無効にする ModelAdmin. get_actions ( request , action_location = ActionLocation.CHANGE_LIST ) [ソース] 最後に、 ModelAdmin.get_actions() をオーバーライドすることで、リクエスト単位で (つ ... 条件付きでアクションを有効/無効にすることができます。 This returns a dictionary of actions allowed for the specific action_location . The keys are action names, and the values are Action objects. たとえば、名前が J で始まるユーザーだけがオブジェクトを一括 ... うにしたい場合、次のようにします。 class MyModelAdmin ( admin . ModelAdmin ): ... def get_actions ( self , request , action_location = ActionLocation . CHANGE_LIST ): actions = super () . get_actions ( request , action_location = action_location ) if requ ... ... or QuerySet of objects. The objects returned will get passed to any callable methods corresponding to a sitemap property ( location , lastmod , changefreq , and priority ). lastmod は datetime を返すべきです。 There is no location method in this example, ... but you can provide it in order to specify the URL for your object. By default, location calls get_absolute_url() on each object and returns the result. Sitemap クラス リファレンス class Sitemap [ソース] サイトマ ... bjects. The framework doesn't care what type of objects they are; all that matters is that these objects get passed to the location , lastmod , changefreq and priority methods. location [ソース] オプション。 メソッドまたは属性のいずれか。 If it's a metho ... ... emcacheCache または django.core.cache.backends.memcached.PyLibMCCache (選択した memcached バインディングによる) に設定する LOCATION を ip:port の値 (ここで、 ip は Memcached デーモンの IP アドレス、 port は Memcached が起動しているポート)、または、 unix: ... ンディングを使用しています。 CACHES = { "default" : { "BACKEND" : "django.core.cache.backends.memcached.PyMemcacheCache" , "LOCATION" : "127.0.0.1:11211" , } } 次の例では、Memcached はローカルの Unix socket ファイル /tmp/memcached.sock 経由で利用可能であり ... ンディングを使用しています。 CACHES = { "default" : { "BACKEND" : "django.core.cache.backends.memcached.PyMemcacheCache" , "LOCATION" : "unix:/tmp/memcached.sock" , } } Memcached の優れた機能の一つは、複数のサーバでキャッシュを共有できることです。つまり、 ... ... to/mysite.com/mysite/wsgi.py WSGIPythonPath /path/to/mysite.com WSGIProcessGroup %{GLOBAL} WSGIApplicationGroup %{GLOBAL} <Location "/secret" > AuthType Basic AuthName "Top Secret" Require valid-user AuthBasicProvider wsgi WSGIAuthUserScript /path/to/mys ... ite.com/mysite/wsgi.py </Location> WSGIAuthUserScript ディレクティブは、プロンプトから受け取ったユーザ名とパスワードを渡して、指定した wsgi スクリプトの che ... になります: WSGIScriptAlias / /path/to/mysite.com/mysite/wsgi.py WSGIProcessGroup %{GLOBAL} WSGIApplicationGroup %{GLOBAL} <Location "/secret" > AuthType Basic AuthName "Top Secret" AuthBasicProvider wsgi WSGIAuthUserScript /path/to/mysite.com/mysite/wsgi ... ... default_storage default_storage は DefaultStorage のインスタンスです。 FileSystemStorage クラス class FileSystemStorage ( location = None , base_url = None , file_permissions_mode = None , directory_permissions_mode = None , allow_overwrite = False ) [ソ ... 実装を提供します。 注釈 FileSystemStorage.delete() メソッドは、指定されたファイル名が存在しない場合に例外を発生させません。 location [ソース] ファイルを格納するディレクトリの絶対パス。デフォルトは MEDIA_ROOT 設定の値です。 base_url [ソース] この場所に保存 ... 変更の時間ですが、他のシステム(例えば Windows)では、ファイルの作成時間です。 InMemoryStorage クラス class InMemoryStorage ( location = None , base_url = None , file_permissions_mode = None , directory_permissions_mode = None ) [ソース] InMemoryStorage クラ ... ... ver been taken in account for JavaScript translations and remain in the same situation considering the deprecation of such location. Transaction management When using managed transactions -- that is, anything but the default autocommit mode -- it is impo ... and syntax. Changes to the login methods of the admin In previous version the admin app defined login methods in multiple locations and ignored the almost identical implementation in the already used auth app. A side effect of this duplication was the m ... aining the settings module) and there has been a shift in other parts of the framework to stop using it as a reference for location of assets at runtime. Detection of the locale subdirectory tends to fail when the deployment scenario is more complex than ... ... hen Granian is installed, a granian command is available which runs ASGI applications. Granian needs to be called with the location of a module containing an ASGI application object, followed by what the application is called (separated by a colon), usin ... ... hen Granian is installed, a granian command is available which runs WSGI applications. Granian needs to be called with the location of a module containing a WSGI application object named application , using the --interface wsgi option. For a typical Djan ... ... sidered URLs like \x08javascript:... safe. This issue doesn't affect Django currently, since we only put this URL into the Location response header and browsers seem to ignore JavaScript there. Browsers we tested also treat URLs prefixed with control cha ... ... a link, they could suffer from a XSS attack. This bug doesn't affect Django currently, since we only put this URL into the Location response header and browsers seem to ignore JavaScript there. バグ修正 Fixed an obscure bug with the override_settings() d ... 2026年10月08日