per page, with , order by , clip by
Results of 1 - 10 of about 12 for compile (0.005 sec.)
ルックアップ API リファレンス 12770
ルックアップ API リファレンス このドキュメントには、データベースクエリの WHERE 句を構築するための Django API であるルックアップの API リファレンスがあります。ルックアップの 使い方 については クエリを作成する を、新しいルックアップの 作り方 ... はこのAPIに従う例です。あるクラスが以下のメソッドを実装している場合、そのクラスはクエリ式APIに従っていると言えます: as_sql ( compiler , connection ) 式の SQL フラグメントを生成します。タプル (sql, params) を返します。 sql は SQL 文字列で、 params はクエリ ... パラメータのリストまたはタプルです。 compiler は SQLCompiler オブジェクトで、他の式をコンパイルするための compile() メソッドを持っています。 connection はクエリの実行に ... 使用する接続です。 expression.as_sql() の呼び出しは通常正しくありません。 代わりに compiler.compile(expression) を使用する必要があります。 compiler.compile() メソッドは式のベンダ固有のメソッドの呼び出しを行います。 ...
https://man.mtool.work/django/6.1/ref/models/lookups.html
エラーレポートの管理 11886
エラーレポートの管理 サイトを公開している場合、 DEBUG 設定は常にオフにしておかなければなりません。これにより、サーバー動作は高速になり、エラーページによって明らかになるアプリケーションの詳細が悪意あるユーザーに漏れるのを防ぎます。 しかし、 ... ます。これはコンパイルされた正規表現オブジェクトのリストでなければなりません。例えば: import re IGNORABLE_404_URLS = [ re . compile ( r "\.(php|cgi)$" ), re . compile ( r "^/phpmyadmin/" ), ] この例では、 .php または .cgi で終わる URL への 404 は報告され ... ん。 以下は、ブラウザやクローラがよくリクエストする従来の URL を除外する方法の例です: import re IGNORABLE_404_URLS = [ re . compile ( r "^/apple-touch-icon.*\.png$" ), re . compile ( r "^/favicon\.ico$" ), re . compile ( r "^/robots\.txt$" ), ] (これらは ... hidden_settings センシティブな設定や request.META にマッチする正規表現オブジェクト。デフォルトでは下記です: import re re . compile ( r "API|AUTH|TOKEN|KEY|SECRET|PASS|SIGNATURE|HTTP_COOKIE" , flags = re . IGNORECASE ) is_active ( request ) [ソース] get_ ...
https://man.mtool.work/django/6.1/howto/error-reporting.html
Django 1.9.2 リリースノート 10541
Django 1.9.2 リリースノート February 1, 2016 Django 1.9.2 fixes a security regression in 1.9 and several bugs in 1.9.1. It also makes a small backwards incompatible change that hopefully doesn't affect any users. Security issue: User with " ... those files now have some invalid Python syntax. This causes difficulties for packaging systems that unconditionally byte-compile *.py files. To remedy this, a .py-tpl suffix is now used for the project and app template files included in Django. The .p ... on SQLite with more than 2000 parameters when DEBUG is True on distributions that increase the SQLITE_MAX_VARIABLE_NUMBER compile-time limit to over 2000, such as Debian ( #26063 ). Fixed a crash when using a reverse OneToOneField in ModelAdmin.readonl ...
https://man.mtool.work/django/6.1/releases/1.9.2.html
カスタムのルックアップを書く 8543
カスタムのルックアップを書く Django には (たとえば exact や icontains などの) フィルタリングを行う 組み込みのルックアップ がたくさんあります。このドキュメントでは、カスタムルックアップを作る方法や、既存のルックアップの動作を変更する方法につ ... させる必要があります。 from django.db.models import Lookup class NotEqual ( Lookup ): lookup_name = "ne" def as_sql ( self , compiler , connection ): lhs , lhs_params = self . process_lhs ( compiler , connection ) rhs , rhs_params = self . process_rhs ( c ... ならない制約は、文字列 __ を決して含んではならないということです。 We then need to define the as_sql method. This takes a SQLCompiler object, called compiler , and the active database connection. SQLCompiler objects are not documented, but the only thing ... we need to know about them is that they have a compile() method which returns a tuple containing an SQL string, and the parameters to be interpolated into that string. In most c ...
https://man.mtool.work/django/6.1/howto/custom-lookups.html
Django 1.4 リリースノート 8543
Django 1.4 リリースノート March 23, 2012 Django 1.4 へようこそ! 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 1.3 or older versions. We've a ... ffixes to IGNORABLE_404_ENDS . In Django 1.4, these two settings are superseded by IGNORABLE_404_URLS , which is a list of compiled regular expressions. Django won't send an email for 404 errors on URLs that match any of them. Furthermore, the previous ... e following lines in your settings file: import re IGNORABLE_404_URLS = ( # for each <prefix> in IGNORABLE_404_STARTS re . compile ( r "^<prefix>" ), # for each <suffix> in IGNORABLE_404_ENDS re . compile ( r "<suffix>$" ), ) Don't forget to escape char ... guments, which could lead to it erroneously considering an argument as a string literal when it wasn't. It now uses parser.compile_filter , like other tags. The internals of the tag aren't part of the official stable API, but in the interests of full di ...
https://man.mtool.work/django/6.1/releases/1.4.html
カスタムのモデルフィールドを作成する 7871
カスタムのモデルフィールドを作成する はじめに モデルリファレンス ドキュメントでは、Djangoの標準フィールドクラスである、 CharField や、 DateField などの使い方を説明しています。多くの場合、これらのクラスがあれば十分です。ただし、Djangoのバージ ... ort gettext_lazy as _ def parse_hand ( hand_string ): """Takes a string of cards and splits into a full hand.""" p1 = re . compile ( ". {26} " ) p2 = re . compile ( ".." ) args = [ p2 . findall ( x ) for x in p1 . findall ( hand_string )] if len ( args ...
https://man.mtool.work/django/6.1/howto/custom-model-fields.html
クエリ式 (Query Expression) 7871
クエリ式 (Query Expression) クエリ式 (query expression) は、update、create、filter、order by、annotation、またはaggregateの一部として使用できる値または計算を記述します。式が真偽値を出力する場合、フィルタで直接使用できます。クエリの記述に使用 ... 。この属性が設定されていて、関数が異なる数の式で呼び出された場合、 TypeError が発生します。デフォルトは None です。 as_sql ( compiler , connection , function = None , template = None , arg_joiner = None , ** extra_context ) [ソース] データベース関数の SQL ... べきです。例えば: django/db/models/functions.py class ConcatPair ( Func ): ... function = "CONCAT" ... def as_mysql ( self , compiler , connection , ** extra_context ): return super () . as_sql ( compiler , connection , function = "CONCAT_WS" , template = ... ( query , allow_joins , reuse , summarize , for_save ) return c 次に、SQLを生成するメソッドを書きます: def as_sql ( self , compiler , connection , template = None ): sql_expressions , sql_params = [], [] for expression in self . expressions : sql , para ...
https://man.mtool.work/django/6.1/ref/models/expressions.html
バリデータ (Validator) 7871
バリデータ (Validator) バリデータを記述する バリデータ (validator) は呼び出し可能なオブジェクトで、値を受け取り、ある基準を満たしていない場合に ValidationError を発生させます。バリデータは異なるタイプのフィールド間でバリデーションロジックを ... ionError が発生します。 regex re.search() を使用して、指定された value 内を検索する正規表現パターンです。これは文字列か re.compile() で作成されたコンパイル済みの正規表現です。 デフォルトは空文字列で、すべての value から検索されます。 message バリデーショ ...
https://man.mtool.work/django/6.1/ref/validators.html
Django 3.0 リリースノート 7641
Django 3.0 リリースノート 2019年12月2日 Django 3.0 へようこそ! このリリースノートでは、 バージョン 3.0 の新機能 と、Django 2.2 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した機能 ... .ExceptionReporter subclass to customize the traceback text sent to site ADMINS when DEBUG is False . 管理コマンド The new compilemessages --ignore option allows ignoring specific directories when searching for .po files to compile. showmigrations --lis ...
https://man.mtool.work/django/6.1/releases/3.0.html
Django 6.1 release notes 7641
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 ... igns_in_column_aliases feature flag is removed. The DatabaseOperations.binary_placeholder_sql() method now expects a query compiler as an extra positional argument and should return a two-elements tuple composed of an SQL format string and a tuple of as ... ing JSONField is now deprecated in favor of the new JSONNull expression. At the end of the deprecation period, None values compile to SQL IS NULL when used as the top-level value. Key and index lookups are unaffected by this deprecation. The undocumente ... L format string and a tuple of associated parameters. This method should now expect to be provided expressions meant to be compiled via the provided compiler argument. The quote_name_unless_alias() method of SQLCompiler , the type of object passed as th ...
https://man.mtool.work/django/6.1/releases/6.1.html
PREV 1 2 NEXT