per page, with , order by , clip by
Results of 1 - 10 of about 15 for attr (0.006 sec.)
How to use Django's Content Security Policy 14106
How to use Django's Content Security Policy Basic config Content Security Policy (CSP) を有効にするには、Django プロジェクトで次のように設定します: Add the CSP middleware to your MIDDLEWARE setting: MIDDLEWARE = [ # ... "django.middleware.c ... mport CSP SECURE_CSP = { "default-src" : [ CSP . SELF ], # Allow self-hosted scripts and script tags with matching `nonce` attr. "script-src" : [ CSP . SELF , CSP . NONCE ], # Example of the less secure 'unsafe-inline' option. "style-src" : [ CSP . S ... cript will be allowed. </ script > For external <script src="..."> and <link rel="stylesheet"> elements, use the csp_nonce_attr template tag: < script src = "/path/to/script.js" {% csp_nonce_attr %} ></ script > < link rel = "stylesheet" href = "/pat ... h/to/style.css" {% csp_nonce_attr %} > To render a Media object's assets with the nonce applied to each element, pass the object to the csp_nonce_attr tag: ...
https://man.mtool.work/django/6.1/howto/csp.html
コンテンツセキュリティポリシー 11633
コンテンツセキュリティポリシー New in Django 6.0. Content Security Policy (CSP) is a web security standard that helps prevent content injection attacks by restricting the sources from which content can be loaded. It plays an important role ... processor needs to be enabled. It adds a csp_nonce variable to the template context. Changed in Django 6.1: The csp_nonce_attr template tag was added, including support for rendering Media objects. For inline <script> and <style> elements, include t ... cript will be allowed. </ script > For external <script src="..."> and <link rel="stylesheet"> elements, use the csp_nonce_attr template tag: < script src = "/path/to/script.js" {% csp_nonce_attr %} ></ script > < link rel = "stylesheet" href = "/pat ... h/to/style.css" {% csp_nonce_attr %} > To render a Media object's assets with the nonce applied, pass the object to the csp_nonce_attr template tag: {% csp_ ...
https://man.mtool.work/django/6.1/ref/csp.html
Django 1.7.11 リリースノート 9056
Django 1.7.11 リリースノート November 24, 2015 Django 1.7.11 fixes a security issue and a data loss bug in 1.7.10. Fixed settings leak possibility in date template filter If an application allows users to specify an unvalidated format for d ... , now only allows accessing the date/time formatting settings. バグ修正 Fixed a data loss possibility with Prefetch if to_attr is set to a ManyToManyField ( #25693 ). ...
https://man.mtool.work/django/6.1/releases/1.7.11.html
QuerySet API リファレンス 8620
QuerySet API リファレンス このドキュメントでは、 QuerySet API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提としていますので、このドキュメントを読む前にこの 2 つを読んでおくことをおすすめします。 このリファレン ... Prefetch ( "restaurants" , queryset = Restaurant . objects . select_related ( "best_pizza" )) ... ) また、オプションの to_attr で、事前読み込みの結果を独自の属性に割り当てることもできます。結果はリストに直接格納されます。 これにより、異なる QuerySet ... Pizza . objects . filter ( vegetarian = True ) >>> Restaurant . objects . prefetch_related ( ... Prefetch ( "pizzas" , to_attr = "menu" ), ... Prefetch ( "pizzas" , queryset = vegetarian_pizzas , to_attr = "vegetarian_menu" ), ... ) 独自の to_attr で ... etarian = True ) >>> Restaurant . objects . prefetch_related ( ... Prefetch ( "pizzas" , queryset = vegetarian_pizzas , to_attr = "vegetarian_menu" ), ... "vegetarian_menu__toppings" , ... ) to_attr の使用は、関係するマネージャのキャッシュにフィルタし ...
https://man.mtool.work/django/6.1/ref/models/querysets.html
Django 1.8.7 リリースノート 8620
Django 1.8.7 リリースノート November 24, 2015 Django 1.8.7 fixes a security issue and several bugs in 1.8.6. Additionally, Django's vendored version of six, django.utils.six , has been upgraded to the latest release (1.10.0). Fixed settings ... on with South migrations in the migrations directory to fail ( #25618 ). Fixed a data loss possibility with Prefetch if to_attr is set to a ManyToManyField ( #25693 ). Fixed a regression in 1.8 by making gettext() once again return UTF-8 bytestrings ...
https://man.mtool.work/django/6.1/releases/1.8.7.html
組み込みテンプレートタグとフィルタ 8185
組み込みテンプレートタグとフィルタ このドキュメントでは、 Django の組み込みテンプレートタグとフィルタについて述べます。 また 自動ドキュメンテーション を使えばインストールされている組み込みタグとカスタムタグのドキュメントを読めるのでお勧めで ... このタグは CSRF の防止のために使用します。詳細は クロスサイトリクエストフォージェリ (CSRF) を参照してください。. csp_nonce_attr New in Django 6.1. When called without arguments, renders a nonce="<value>" HTML attribute when the csp() context processo ... link> elements to allow them under a nonce-based Content Security Policy: < script src = "/path/to/script.js" {% csp_nonce_attr %} ></ script > < link rel = "stylesheet" href = "/path/to/style.css" {% csp_nonce_attr %} > When called with a Media obje ... ct as the argument, renders its assets with the CSP nonce applied to each <script> and <link> element: {% csp_nonce_attr form.media %} In both forms, if the context processor is not configured, assets are rendered without a nonce attribute. Se ...
https://man.mtool.work/django/6.1/ref/templates/builtins.html
テストツール 8185
テストツール Django は、テストを書くのに便利なツールをいくつか提供しています。 There are community-maintained solutions! Django has a vibrant ecosystem. There are testing and fixtures solutions highlighted on the Community Ecosystem page. T ... re. Remember that if you want your test user to have a password, you can't set the user's password by setting the password attribute directly -- you must use the set_password() function to store a correctly hashed password. Alternatively, you can use ... 集した設定 でテストを実行する機能。 Access to the synchronous and asynchronous test clients via the client and async_client attributes. データベースクエリを作る手薄との場合、サブクラス TransactionTestCase や TestCase を使用してください。 SimpleTestCas ... SQL) で実行される場合、各テストの前に setUpTestData() が呼ばれ、高速化のメリットはなくなります。 Objects assigned to class attributes in setUpTestData() must support creating deep copies with copy.deepcopy() in order to isolate them from alterations ...
https://man.mtool.work/django/6.1/topics/testing/tools.html
高度なチュートリアル: 再利用可能アプリの書き方 7872
高度なチュートリアル: 再利用可能アプリの書き方 この高度なチュートリアルは、 チュートリアル その8 が終わったところから始まります。Web投票アプリケーションを、新しいプロジェクトで再利用でき、他の人に共有できる独立した Python のパッケージへと変 ... "django" : ( "https://docs.djangoproject.com/en/stable/" , None , ), } これを設定すると、 Django ドキュメントと同様に、 " :attr:`django.test.TransactionTestCase.databases` " などの特定のエントリに相互リンクできるようになります。 build パッケージがイン ...
https://man.mtool.work/django/6.1/intro/reusable-apps.html
contenttypes フレームワーク 7872
contenttypes フレームワーク Django には contenttypes アプリケーションが含まれており、 Django を使ったプロジェクトにインストールされているすべてのモデルを追跡し、モデルを扱うための高レベルで汎用的なインターフェースを提供します。 概要 content ... ぞれスタックレイアウトと表形式のレイアウトを持っています。 GenericPrefetch() class GenericPrefetch ( lookup , querysets , to_attr = None ) [ソース] このルックアップは Prefetch() に類似しており、 GenericForeignKey 専用に使用されるべきです。 querysets 引 ...
https://man.mtool.work/django/6.1/ref/contrib/contenttypes.html
Django 6.1 release notes 7872
Django 6.1 release notes August 5, 2026 Welcome to Django 6.1! These release notes cover the new features , as well as some backwards incompatible changes you'll want to be aware of when upgrading from Django 6.0 or earlier. We've begun the ... ash index type. django.contrib.sessions SessionBase now supports boolean evaluation via __bool__() . CSP The new csp_nonce_attr template tag renders the CSP nonce attribute on <script> and <link> elements, or renders a Media object's assets with the ... ddleware is enabled with CSP.NONCE in a CSP policy but django.template.context_processors.csp is not configured. CSP nonce attributes are now added on <script> , <style> , and <link> elements in admin templates and all built-in templates when the csp ... fined but does not include a 'default' entry. フォーム The new asset object Stylesheet is available for adding custom HTML-attributes to stylesheet links in form media. See paths as objects for more details. The new constant django.db.models.fields.B ...
https://man.mtool.work/django/6.1/releases/6.1.html
PREV 1 2 NEXT