per page, with , order by , clip by
Results of 1 - 10 of about 95 for update (0.009 sec.)
モデルインスタンスリファレンス 13218
モデルインスタンスリファレンス このドキュメントでは、 Model API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提としていますので、このドキュメントを読む前にこの 2 つを読んでおいた方がよいでしょう。 このリファレン ... を強制的に設定する際に使用できます。 読み込むフィールドのセットを強制的に設定するには fields 引数を使用できます。 たとえば、 update() の呼び出しによって期待する更新が行われたかをテストするため、以下のようなテストを書くことができます。 def test_update_res ... ult ( self ): obj = MyModel . objects . create ( val = 1 ) MyModel . objects . filter ( pk = obj . pk ) . update ( val = F ( "val" ) + 1 ) # At this point obj.val is still 1, but the value in the database # was updated to 2. The object ... 's updated value needs to be reloaded # from the database. obj . refresh_from_db () self . assertEqual ( obj . val , 2 ) When a defe ...
https://man.mtool.work/django/6.1/ref/models/instances.html
QuerySet API リファレンス 13060
QuerySet API リファレンス このドキュメントでは、 QuerySet API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提としていますので、このドキュメントを読む前にこの 2 つを読んでおくことをおすすめします。 このリファレン ... . filter ( entries__gt = 5 ) alias() can be used in conjunction with annotate() , exclude() , filter() , order_by() , and update() . To use an aliased expression with other methods (e.g. aggregate() ), you must promote it to an annotation: Blog . obje ... ntry . objects . all () # queries the database with the 'backup' alias >>> Entry . objects . using ( "backup" ) select_for_update() select_for_update ( nowait = False , skip_locked = False , of = () , no_key = False ) トランザクションが終了するまで行を ... ロックし、サポートされているデータベース上で SELECT ... FOR UPDATE SQL 文を生成する QuerySet を返します。 例: from django.db import transaction entries = Entry . objects . select_for_update ...
https://man.mtool.work/django/6.1/ref/models/querysets.html
How to release Django 12810
How to release Django このドキュメントでは、Django のリリース方法について説明しています。 これらの手順を変更した場合は、最新の情報を保ってください! ここでのポイントは、規定を設けるのではなく、説明的であることです。自由に効率化したり、変更し ... 4.0.x, and, depending on timing, perhaps a 4.1.x. Regular version releases: either a final release (e.g. 4.1) or a bugfix update (e.g. 4.1.1). Pre-releases: e.g. 4.2 alpha, beta, or rc. The short version of the steps involved is: If this is a security ... lease. Proofread the release notes, looking for organization and writing errors. Draft a blog post and email announcement. Update version numbers and create the release artifacts. Create the new Release in the admin on djangoproject.com . Set the prope ... active flag for each release in the admin on djangoproject.com . Post the blog entry and send out the email announcements. Update version numbers post-release in stable branch(es). Add stub release notes for the next patch release in main and backport. ...
https://man.mtool.work/django/6.1/internals/howto-release-django.html
管理アクション 8623
管理アクション Djangoの管理者の基本的な仕事は、一言で言えば、「オブジェクトを選択し、それを変更する」ことに尽きます。これは大多数のユースケースに当てはまります。しかし、一度に多くのオブジェクトに同じ変更を適用する必要がある場合、この仕事は退 ... オブジェクトを必要としませんが、クエリセットを使用します: def make_published ( modeladmin , request , queryset ): queryset . update ( status = "p" ) 注釈 最高のパフォーマンスを得るために、クエリセットの update メソッド を使用しています。他のタイプのアクシ ... ( description = "Mark selected stories as published" ) def make_published ( modeladmin , request , queryset ): queryset . update ( status = "p" ) 注釈 これには見覚えがあるかもしれません。admin の list_display オプションも、登録されたコールバック関数に ... ( description = "Mark selected stories as published" ) def make_published ( modeladmin , request , queryset ): queryset . update ( status = "p" ) class ArticleAdmin ( admin . ModelAdmin ): list_display = [ "title" , "status" ] ordering = [ "title" ] a ...
https://man.mtool.work/django/6.1/ref/contrib/admin/actions.html
Django 1.7 リリースノート 8057
Django 1.7 リリースノート September 2, 2014 Django 1.7 へようこそ! このリリースノートでは、 バージョン 1.7 の新機能 と、Django 1.6 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した ... o 1.8. Django 1.7 の新機能 Schema migrations Django now has built-in support for schema migrations. It allows models to be updated, changed, and deleted by creating migration files that represent the model changes and which can be run on any developmen ... access to forms by their step name. django.contrib.gis The default OpenLayers library version included in widgets has been updated from 2.11 to 2.13. Prepared geometries now also support the crosses , disjoint , overlaps , touches and within predicates ... he directories it searched. See findstatic for example output. django.contrib.syndication The Atom1Feed syndication feed's updated element now utilizes updateddate instead of pubdate , allowing the published element to be included in the feed (which re ...
https://man.mtool.work/django/6.1/releases/1.7.html
Django 1.4 リリースノート 7899
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 ... for useful pointers. Other notable new features in Django 1.4 include: A number of ORM improvements, including SELECT FOR UPDATE support , the ability to bulk insert large datasets for improved performance, and QuerySet.prefetch_related , a method to ... bcrypt support), new tools for cryptographic signing , several CSRF improvements , and simple clickjacking protection . An updated default project layout and manage.py that removes the "magic" from prior versions. And for those who don't like the new l ... etween your site's front and back ends more comprehensively. See the documentation for more details and concrete examples. Updated default project layout and manage.py Django 1.4 ships with an updated default project layout and manage.py file for the s ...
https://man.mtool.work/django/6.1/releases/1.4.html
Django 1.6.3 リリースノート 7662
Django 1.6.3 リリースノート April 21, 2014 Django 1.6.3 fixes several bugs in 1.6.2, including three security issues, and makes one backwards-incompatible change: Unexpected code execution using reverse() Django's URL handling is based on a ... did not correctly convert their arguments: FilePathField GenericIPAddressField IPAddressField These three fields have been updated to convert their arguments to the correct types before querying. Additionally, developers of custom model fields are now ... ments -- will be advised to ensure they perform appropriate manual type conversions prior to executing queries. select_for_update() requires a transaction Historically, queries that use select_for_update() could be executed in autocommit mode, outside ... n. Django 1.6 introduced database-level autocommit; since then, execution in such a context voids the effect of select_for_update() . It is, therefore, assumed now to be an error and raises an exception. This change was made because such errors can be ...
https://man.mtool.work/django/6.1/releases/1.6.3.html
Django 1.6 リリースノート 7583
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 ... ompatible with the current version of Django. Model.save() algorithm changed The Model.save() method now tries to directly UPDATE the database if the instance has a primary key value. Previously SELECT was performed to determine if UPDATE or INSERT wer ... Model.save() for more details. In some rare cases the database doesn't report that a matching row was found when doing an UPDATE . An example is the PostgreSQL ON UPDATE trigger which returns NULL . In such cases it is possible to set django.db.models ... error_messages argument of a Field 's constructor. To take advantage of this new feature with your custom fields, see the updated recommendation for raising a ValidationError . ModelAdmin now preserves filters on the list view after creating, editing ...
https://man.mtool.work/django/6.1/releases/1.6.html
Django 3.0 リリースノート 7504
Django 3.0 リリースノート 2019年12月2日 Django 3.0 へようこそ! このリリースノートでは、 バージョン 3.0 の新機能 と、Django 2.2 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した機能 ... ovided, and always performs a single INSERT query. In older Django versions, Model.save() performed either an INSERT or an UPDATE based on whether or not the row exists. This makes calling Model.save() while providing a default primary key value equiva ... lent to passing force_insert=True to model's save() . Attempts to use a new Model instance to update an existing row will result in an IntegrityError . In order to update an existing model for a specific primary key value, ... use the update_or_create() method or QuerySet.filter(pk=…).update(…) instead. For example: >>> MyModel . objects . update_or_create ( pk ...
https://man.mtool.work/django/6.1/releases/3.0.html
クエリを作成する 7425
クエリを作成する 一度 データモデル を作成すれば、Django はデータオブジェクトの作成、取得、更新および削除を行えるようにデータベースを抽象化した API を自動的に提供します。本ドキュメントではこの API をどのように用いるかを説明します。多様なモデ ... の例ではその名前を変更し、データベース内のレコードを更新します: >>> b5 . name = "New name" >>> b5 . save () この例では内部で UPDATE SQL 文が処理されます。明示的に save() が呼ばれるまで Django はデータベースを操作しません。 ForeignKey と ManyToManyField フ ... log . save () 複数のオブジェクトを一括で更新する QuerySet のすべてのオブジェクトに、特定の値をセットしたい場合があります。 update() を使えば実現できます。例えば: # Update all the headlines with pub_date in 2007. Entry . objects . filter ( pub_date__yea ... r = 2007 ) . update ( headline = "Everything is the same" ) このメソッドを使ってセットできるのは非リレーションフィールドと ForeignKey フィール ...
https://man.mtool.work/django/6.1/topics/db/queries.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT