per page, with , order by , clip by
Results of 1 - 10 of about 39 for execute (0.005 sec.)
データベースの計測 15756
データベースの計測 コードから発行されたクエリを理解して制御するために、Django は、データベースクエリの実行周辺にラッパー関数をインストールするためのフックを提供しています。たとえば、ラッパーは、クエリのカウント、クエリの実行時間の測定、クエ ... def my_view ( request ): context = { ... } # Code to generate context with all data. template_name = ... with connection . execute_wrapper ( blocker ): return render ( request , template_name , context ) ラッパーに送られるパラメーターは以下の通りです: e ... ースに送信する SQL クエリの str 。 params -- SQL コマンドのパラメータ値のリストまたはタプル、または、ラップされた呼び出しが executemany() の場合はリストまたはタプルのリストまたはタプル。 many -- 最終的に呼び出すのが execute() なのか executemany() なのかを ... 、次のように、もう少し複雑なバージョンのブロッカーで、エラーメッセージにコネクション名を含めることができます。 def blocker ( execute , sql , params , many , context ): alias = context [ "connection" ] . alias raise Exception ( "Access to database ' {} ' b ...
https://man.mtool.work/django/6.1/topics/db/instrumentation.html
素の SQL 文の実行 12122
素の SQL 文の実行 Django gives you three ways of performing raw SQL queries: you can embed raw SQL fragments into ORM queries using RawSQL (see Raw SQL fragments ), use Manager.raw() to perform raw queries and return model instances , or av ... oid the model layer entirely and execute custom SQL directly . 素のSQLを使う前にORMを調べましょう! Django ORM は、素の SQL を書かずにクエリを表現するための多くのツ ... ースコネクションを利用するには、カーソルオブジェクトを取得するため connection.cursor() を呼び出してください。そして、 cursor.execute(sql, [params]) を呼び出して SQL を実行した後、 cursor.fetchone() もしくは cursor.fetchall() が結果の行を返します。 例: fro ... m django.db import connection def my_custom_sql ( self ): with connection . cursor () as cursor : cursor . execute ( "UPDATE bar SET foo = 1 WHERE baz = %s " , [ self . baz ]) cursor . execute ( "SELECT foo FROM bar WHERE baz = %s " , [ ...
https://man.mtool.work/django/6.1/topics/db/sql.html
Django 1.6 リリースノート 8990
Django 1.6 リリースノート 注釈 Dedicated to Malcolm Tredinnick On March 17, 2013, the Django project and the free software community lost a very dear friend and developer. Malcolm was a long-time contributor to Django, a model community mem ... ch returns FormMixin.prefix by default) to allow customizing the prefix of the form. Raw queries ( Manager.raw() or cursor.execute() ) can now use the "pyformat" parameter style, where placeholders in the query are given as '%(name)s' and the parameters ... e an exception on Oracle. You will need to change the column type in your database to benefit from this change. For MySQL, execute this query on your project's database: ALTER TABLE django_comments MODIFY ip_address VARCHAR ( 39 ); For Oracle, execute t ... le, an exception is generated. No database change is needed for SQLite or PostgreSQL databases. Percent literals in cursor.execute queries When you are running raw SQL queries through the cursor.execute method, the rule about doubling percent literals ( ...
https://man.mtool.work/django/6.1/releases/1.6.html
Django 1.4 リリースノート 8849
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 ... os . environ . setdefault ( "DJANGO_SETTINGS_MODULE" , "{{ project_name }}.settings" ) from django.core.management import execute_from_command_line execute_from_command_line ( sys . argv ) {{ project_name }} should be replaced with the Python package n ... setting the DJANGO_SETTINGS_MODULE environment variable or using django.conf.settings.configure() . django.core.management.execute_manager This function was previously used by manage.py to execute a management command. It is identical to django.core.man ... agement.execute_from_command_line , except that it first calls setup_environ , which is now deprecated. As such, execute_manager is also d ...
https://man.mtool.work/django/6.1/releases/1.4.html
Django 1.8.16 リリースノート 8097
Django 1.8.16 リリースノート November 1, 2016 Django 1.8.16 fixes two security issues in 1.8.15. User with hardcoded password created when running tests on Oracle When running tests with an Oracle database, Django creates a temporary databa ... no development instance, for example. If a project uses a package like the django-debug-toolbar , then the attacker could execute arbitrary SQL, which could be especially bad if the developers connect to the database with a superuser account. settings. ...
https://man.mtool.work/django/6.1/releases/1.8.16.html
Django 1.8.5 リリースノート 8097
Django 1.8.5 リリースノート October 3, 2015 Django 1.8.5 fixes several bugs in 1.8.4. バグ修正 Made the development server's autoreload more robust ( #24704 ). Fixed AssertionError in some delete queries with a model containing a field that ... grations crash on MySQL when adding a text or a blob field with an unhashable default ( #25393 ). Changed Count queries to execute COUNT(*) instead of COUNT('*') as versions of Django before 1.8 did ( #25377 ). This may fix a performance regression on s ...
https://man.mtool.work/django/6.1/releases/1.8.5.html
Django 1.9.11 リリースノート 8097
Django 1.9.11 リリースノート November 1, 2016 Django 1.9.11 では、1.9.10 にあった2つのセキュリティの問題を修正しました。 User with hardcoded password created when running tests on Oracle When running tests with an Oracle database, Django cr ... no development instance, for example. If a project uses a package like the django-debug-toolbar , then the attacker could execute arbitrary SQL, which could be especially bad if the developers connect to the database with a superuser account. settings. ...
https://man.mtool.work/django/6.1/releases/1.9.11.html
コンテンツセキュリティポリシー 7972
コンテンツセキュリティポリシー 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 ... nerated per HTTP response. Django supports nonces as a secure way to allow specific inline <script> or <style> elements to execute without relying on 'unsafe-inline' . Nonces are enabled by including the special placeholder NONCE in the relevant directi ... e nonce applied, pass the object to the csp_nonce_attr template tag: {% csp_nonce_attr form.media %} The browser will only execute inline elements that include a nonce=<value> attribute matching the one specified in the Content-Security-Policy (or Conte ...
https://man.mtool.work/django/6.1/ref/csp.html
SchemaEditor 7972
SchemaEditor class BaseDatabaseSchemaEditor [ソース] Django のマイグレーションシステムは2つの部分に分かれています。データベースに対してどのような操作を実行するべきかを計算してその結果を保管するロジックの部分 ( django.db.migrations )と、「モ ... 的である限り、組み込みの Django SchemaEditor クラスの一つをサブクラス化して、文法を少し変更するだけで済むはずです。 メソッド execute() BaseDatabaseSchemaEditor. execute ( sql , params = () ) [ソース] 渡されたSQL文を実行し、パラメータが指定されている場合は ...
https://man.mtool.work/django/6.1/ref/schema-editor.html
Django 4.0.2 リリースノート 7972
Django 4.0.2 リリースノート 2022年2月1日 Django 4.0.2 では、 4.0.1 における深刻度 "medium" のセキュリティの問題2件と、いくつかのバグを修正しました。また、 Transifex からの最新の文字列翻訳が反映され、ブルガリア語の翻訳が完了しました。 CVE-20 ... in an infinite loop when parsing files. バグ修正 Fixed a bug in Django 4.0 where TestCase.captureOnCommitCallbacks() could execute callbacks multiple times ( #33410 ). Fixed a regression in Django 4.0 where help_text was HTML-escaped in automatically-ge ...
https://man.mtool.work/django/6.1/releases/4.0.2.html
PREV 1 2 3 4 NEXT