per page, with , order by , clip by
Results of 1 - 10 of about 36 for transaction (0.009 sec.)
データベースのトランザクション 16435
データベースのトランザクション Django では、データベースのトランザクションをコントロールする方法が提供されています。 データベースのトランザクションを管理する Django のデフォルトのトランザクションの動作 Django のデフォルトの動作は、オートコミ ... using = None ) [ソース] このデコレータは、与えられたビューのために ATOMIC_REQUESTS を無効化します。 from django.db import transaction @transaction . non_atomic_requests def my_view ( request ): do_stuff () @transaction . non_atomic_requests ( using = "othe ... ックの中に入れ子になっている場合、 RuntimeError が発生します。 atomic is usable both as a decorator : from django.db import transaction @transaction . atomic def viewfunc ( request ): # This code executes inside a transaction. do_stuff () and as a context ma ... nager : from django.db import transaction def viewfunc ( request ): # This code executes in autocommit mode (Django's default). do_stuff () with transaction . atomi ...
https://man.mtool.work/django/6.1/topics/db/transactions.html
Django 1.3 リリースノート 9493
Django 1.3 リリースノート March 23, 2011 Django 1.3 へようこそ! Nearly a year in the making, Django 1.3 includes quite a few new features and plenty of bug fixes and improvements to existing features. These release notes cover the new featu ... u want to continue to use the base unittest library, you can -- you just won't get any of the nice new unittest2 features. Transaction context managers Users of Python 2.5 and above may now use transaction management functions as context managers. For examp ... le: with transaction . autocommit (): ... Configurable delete-cascade ForeignKey and OneToOneField now accept an on_delete argument to customiz ... also delete the file from the backend storage. This opened the door to several data-loss scenarios, including rolled-back transactions and fields on different models referencing the same file. In Django 1.3, when a model is deleted the FileField 's delete( ...
https://man.mtool.work/django/6.1/releases/1.3.html
Django 1.6 リリースノート 9493
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 ... faults to SQLite. If the default templates don't suit your tastes, you can use custom project and app templates . Improved transaction management Django's transaction management was overhauled. Database-level autocommit is now turned on by default. This mak ... es transaction handling more explicit and should improve performance. The existing APIs were deprecated, and new APIs were introduced, as ... described in the transaction management docs . Persistent database connections Django now supports reusing the same database connection for several req ...
https://man.mtool.work/django/6.1/releases/1.6.html
Django's Tasks framework 9113
Django's Tasks framework New in Django 6.0: For older Django versions, the django-tasks backport is available. For a web application, there's often more than just turning HTTP requests into HTTP responses. For some functionality, it may be ... トランザクション For most backends, Tasks are run in a separate process, using a different database connection. When using a transaction, without waiting for it to commit, workers could start to process a Task which uses objects it can't access yet. For examp ... le, consider this simplified example: @task def my_task ( thing_num ): Thing . objects . get ( num = thing_num ) with transaction . atomic (): Thing . objects . create ( num = 1 ) my_task . enqueue ( thing_num = 1 ) To prevent the scenario where my_tas ... k runs before the Thing is committed to the database, use transaction.on_commit() , binding all arguments to enqueue() via functools.partial() : from functools import partial from django.db im ...
https://man.mtool.work/django/6.1/topics/tasks.html
PostgreSQL 固有のデータベース関数 8732
PostgreSQL 固有のデータベース関数 これらの関数はすべて django.contrib.postgres.functions モジュールから利用できます。 RandomUUID class RandomUUID [ソース] バージョン 4 の UUID を返します。 使用例: >>> from django.contrib.postgres.functions ... django.db.models.functions.UUID4 is a cross-database version of this function. RandomUUID may be deprecated in the future. TransactionNow class TransactionNow [ソース] 現在のトランザクションが開始されたデータベースサーバー上の日時を返します。トランザクション ... tions.Now を補完するもので、現在のステートメントの日時を返します。 Note that only the outermost call to atomic() sets up a transaction and thus sets the time that TransactionNow() will return; nested calls create savepoints which do not affect the transacti ... on time. 使用例: >>> from django.contrib.postgres.functions import TransactionNow >>> Article . objects . filter ( published__lte = TransactionNow ()) <QuerySet [<Article: How to Django>]> ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/functions.html
Django 1.8 リリースノート 8415
Django 1.8 リリースノート April 1, 2015 Django 1.8 へようこそ! このリリースノートでは、 バージョン 1.8 の新機能 と、Django 1.7 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した機能 ... , and Substr . TestCase data setup TestCase has been refactored to allow for data initialization at the class level using transactions and savepoints. Database backends which do not support transactions, like MySQL with the MyISAM storage engine, will stil ... ine for a given feature, its removal may appear as a backwards incompatible change. Related object operations are run in a transaction Some operations on related objects such as add() or direct assignment ran multiple data modifying queries without wrapping ... them in transactions. To reduce the risk of data corruption, all data modifying methods that affect multiple related objects (i.e. add() , rem ...
https://man.mtool.work/django/6.1/releases/1.8.html
Django 1.1 リリースノート 8193
Django 1.1 リリースノート July 29, 2009 Django 1.1 へようこそ! Django 1.1 includes a number of nifty new features , lots of bug fixes, and an easy upgrade path from Django 1.0. Backwards-incompatible changes in 1.1 Django has a policy of AP ... 4-bit constraints, you will need to manually drop the old constraint prior to invoking reset . Test cases are now run in a transaction Django 1.1 runs tests inside a transaction, allowing better test performance (see test performance improvements for detail ... s). This change is slightly backwards incompatible if existing tests need to test transactional behavior, if they rely on invalid assumptions about the test environment, or if they require a specific test case orderi ... ng. For these cases, TransactionTestCase can be used instead. This is a just a quick fix to get around test case errors revealed by the new rollback approa ...
https://man.mtool.work/django/6.1/releases/1.1.html
Django の機能廃止のタイムライン 8114
Django の機能廃止のタイムライン このドキュメントは、 非推奨化ポリシー に従って、Django の様々なパーツが互換性を伴わない方法で変更または削除されるタイミングについて概説しています。各項目についての詳細は、多くの場合 2 つ前のバージョンのリリー ... rt for overriding ModelAdmin.get_action_choices() without the new action_location parameter will be removed. The django.db.transaction.savepoint() alias to django.db.transaction.savepoint_create() will be removed. Support for Model.from_db() methods that do ... eometryWidget の map_width と map_height 属性は削除されます。 SimpleTestCase.assertFormsetError() メソッドは削除されます。 TransactionTestCase.assertQuerysetEqual() メソッドは削除されます。 JSONField と関連するルックアップや式に対して、エンコードされた JSON ... EmailValidator の whitelist 引数と domain_whitelist 属性が削除されます。 default_app_config モジュール変数は削除されます。 TransactionTestCase.assertQuerysetEqual() は、文字列の値と比較する際に、クエリセットに対して自動的に repr() を呼び出すことはなくなりま ...
https://man.mtool.work/django/6.1/internals/deprecation.html
LayerMapping データインポートユーティリティ 8114
LayerMapping データインポートユーティリティ LayerMapping クラスは、ベクトル空間データファイル (例: shapefile) の内容を GeoDjango モデルにマッピングする方法を提供します。 このユーティリティは、ベクターレイヤーからジオメトリとフィールドを取り ... e. LayerMapping API class LayerMapping ( model , data_source , mapping , layer = 0 , source_srs = None , encoding = None , transaction_mode = 'commit_on_success' , transform = True , unique = True , using = 'default' ) [ソース] 以下は LayerMapping オブジェク ... g of the strings in the OGR data source. For example, 'latin-1' , 'utf-8' , and 'cp437' are all valid encoding parameters. transaction_mode commit_on_success' (デフォルト) または 'autocommit' を指定します。 transform Setting this to False will disable coord ... given name(s). Geometries from each feature will be added into the collection associated with the unique model. Forces the transaction mode to be 'autocommit' . using 空間データをインポートする際に使用するデータベースを設定します。デフォルトは 'default' です ...
https://man.mtool.work/django/6.1/ref/contrib/gis/layermapping.html
データベースのマイグレーションの作成方法 8035
データベースのマイグレーションの作成方法 このドキュメントでは、遭遇する可能性のあるいくつかのシナリオに対する、データベースのマイグレーションの構成方法と書き方について説明します。マイグレーションに関する入門的な資料を探しているなら、 トピッ ... tions class Migration ( migrations . Migration ): atomic = False Within such a migration, all operations are run without a transaction. It's possible to execute parts of the migration inside a transaction using atomic() or by passing atomic=True to RunPytho ... ーブルを小さなバッチで更新する、非アトミックなデータマイグレーションの例です: import uuid from django.db import migrations , transaction def gen_uuid ( apps , schema_editor ): MyModel = apps . get_model ( "myapp" , "MyModel" ) while MyModel . objects . filter ... ( uuid__isnull = True ) . exists (): with transaction . atomic (): for row in MyModel . objects . filter ( uuid__isnull = True )[: 1000 ]: row . uuid = uuid . uuid4 () row . sa ...
https://man.mtool.work/django/6.1/howto/writing-migrations.html
PREV 1 2 3 4 NEXT