per page, with , order by , clip by
Results of 1 - 10 of about 146 for create (0.013 sec.)
データベース関数 13086
データベース関数 The classes documented below provide a way for users to use functions provided by the underlying database as annotations, aggregations, or filters in Django. Functions are also expressions , so they can be used and combined ... 使用例: >>> from django.db.models import FloatField >>> from django.db.models.functions import Cast >>> Author . objects . create ( age = 25 , name = "Margaret Smith" ) >>> author = Author . objects . annotate ( ... age_as_float = Cast ( "age" , output ... ost public >>> from django.db.models import Sum >>> from django.db.models.functions import Coalesce >>> Author . objects . create ( name = "Margaret Smith" , goes_by = "Maggie" ) >>> author = Author . objects . annotate ( screen_name = Coalesce ( "alia ... ey ( Blog , on_delete = models . CASCADE ) >>> from django.db.models.functions import Greatest >>> blog = Blog . objects . create ( body = "Greatest is the best." ) >>> comment = Comment . objects . create ( body = "No, Least is better." , blog = blog ...
https://man.mtool.work/django/6.1/ref/models/database-functions.html
PostgreSQL 固有のモデルフィールド 12038
PostgreSQL 固有のモデルフィールド これらのフィールドは全て django.contrib.postgres.fields モジュールから利用できます。 これらのフィールドにインデックスを付ける Index と Field.db_index は両方とも B-tree インデックスを作成しますが、複雑なデー ... ジェクトは、渡された値がデータの部分集合であるものです。これは SQL 演算子 @> を使用します。たとえば、: >>> Post . objects . create ( name = "First post" , tags = [ "thoughts" , "django" ]) >>> Post . objects . create ( name = "Second post" , tags = [ "t ... houghts" ]) >>> Post . objects . create ( name = "Third post" , tags = [ "tutorial" , "django" ]) >>> Post . objects . filter ( tags__contains = [ "thoughts" ]) < ... ジェクトは、データが渡された値の部分集合であるものです。これにはSQL演算子 <@ が使用されます。たとえば: >>> Post . objects . create ( name = "First post" , tags = [ "thoughts" , "django" ]) >>> Post . objects . create ( name = "Second post" , tags = [ "t ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/fields.html
QuerySet API リファレンス 10059
QuerySet API リファレンス このドキュメントでは、 QuerySet API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提としていますので、このドキュメントを読む前にこの 2 つを読んでおくことをおすすめします。 このリファレン ... ions directly, but expression construction and usage often does not happen in the same place (for example, QuerySet method creates expressions, for later use in views). alias() allows building complex expressions incrementally (possibly spanning multip ... ch_mode() New in Django 6.1. fetch_mode ( mode ) Returns a QuerySet that sets the given fetch mode for all model instances created by this QuerySet . The fetch mode controls on-demand loading of fields when they are accessed, such as for foreign keys a ... ーマンスが低下します。ですから、この機能は注意深く利用してください! Also, if you call the database-altering methods add() , create() , remove() , clear() or set() , on a RelatedManager , any prefetched cache for the relation will be cleared. 通常の結合構 ...
https://man.mtool.work/django/6.1/ref/models/querysets.html
クエリを作成する 9223
クエリを作成する 一度 データモデル を作成すれば、Django はデータオブジェクトの作成、取得、更新および削除を行えるようにデータベースを抽象化した API を自動的に提供します。本ドキュメントではこの API をどのように用いるかを説明します。多様なモデ ... 参考 save() はここには記述されていない多数の高度なオプションを持ちます。詳細については save() の項目を参照してください。 To create and save an object in a single step, use the create() method. オブジェクトに対する変更を保存する 既にデータベース上に存在す ... or インスタンス joe を entry オブジェクトに追加しています: >>> from blog.models import Author >>> joe = Author . objects . create ( name = "Joe" ) >>> entry . authors . add ( joe ) 複数のレコードを ManyToManyField に一気に追加するには、 add() の呼び出し ... に複数の引数を含めてください: >>> john = Author . objects . create ( name = "John" ) >>> paul = Author . objects . create ( name = "Paul" ) >>> george = Author . objects . create ( name = " ...
https://man.mtool.work/django/6.1/topics/db/queries.html
How to release Django 8869
How to release Django このドキュメントでは、Django のリリース方法について説明しています。 これらの手順を変更した場合は、最新の情報を保ってください! ここでのポイントは、規定を設けるのではなく、説明的であることです。自由に効率化したり、変更し ... e 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 proper date but ensure the flag ... release if necessary. Ensure your PyPI account only uses WebAuthn-based authentication factors, not TOTP (one-time codes). Create an API token following the official documentation , and set up your $HOME/.pypirc file like this: ~/.pypirc [distutils] in ... st.api.transifex.com token = # API token Access to the Django admin on djangoproject.com as a "Site maintainer". Access to create a post in the Django Forum - Announcements category and to send emails to the django-announce mailing list. Access to the ...
https://man.mtool.work/django/6.1/internals/howto-release-django.html
データベース 8798
データベース Django は次のデータベースを公式にサポートしています。 PostgreSQL MariaDB MySQL Oracle SQLite サードパーティから提供されているデータベースバックエンド も多数あります。 Django はすべてのデータベースで可能な限り多くの機能をサポート ... r カラムと text カラムのインデックス When specifying db_index=True on your model fields, Django typically outputs a single CREATE INDEX statement. However, if the database type for the field is either varchar or text (e.g., used by CharField , FileFiel ... d , and TextField ), then Django will create an additional index that uses an appropriate PostgreSQL operator class for the column. The extra index is necessary to cor ... ション・オペレーション マイグレーションを使用して PostgreSQL 拡張機能 ( hstore や postgis など) を追加する必要がある場合は、 CreateExtension オペレーションを使用してください。 サーバーサイド・カーソル QuerySet.iterator() を使うと、 Django は サーバーサイ ...
https://man.mtool.work/django/6.1/ref/databases.html
PostGIS のインストール 8374
PostGIS のインストール PostGIS は、PostgreSQL に地理オブジェクトのサポートを追加し、それを空間データベースに変えます。PostGIS をビルドする前に、 GEOS 、 PROJ 、 GDAL をインストールする必要があります。追加のライブラリが必要な場合もあるので、 ... 空間データベースを作成する PostGIS には、空間機能を有効にするために使用される PostgreSQL 用の拡張機能が含まれています。 $ createdb <db name> $ psql <db name> > CREATE EXTENSION postgis ; データベースユーザーは、 CREATE EXTENSION postgis; を実行するため ... トでの代替方法として、マイグレーションオペレーションを使用する方法があります: from django.contrib.postgres.operations import CreateExtension from django.db import migrations class Migration ( migrations . Migration ): operations = [ CreateExtension ( "po ... ), ... ] PostGIS のラスタ機能を使用する予定がある場合は、 postgis_raster 拡張機能も有効にする必要があります。拡張機能は、 CreateExtension マイグレーション操作を使用してインストールするか、または直接 CREATE EXTENSION postgis_raster; を実行することでイン ...
https://man.mtool.work/django/6.1/ref/contrib/gis/install/postgis.html
Django 4.1.4 リリースノート 8092
Django 4.1.4 リリースノート 2022年12月6日 Django 4.1.4 では、4.1.3 におけるいくつかのバグを修正しました。 バグ修正 Django 4.1 において、SQLite で ManyToManyField を追加する際に不要なテーブルの再構築が発生するリグレッションが修正されました ( ... ップインデックスビューがクラッシュするバグが修正されました ( #34088 )。 Django 4.1 において、関連マネージャの非同期メソッド acreate() , aget_or_create() , aupdate_or_create() を使用した際にクラッシュするバグが修正されました ( #34139 )。 Django 4.1 で、 u ... nique_fields に "pk" が含まれている場合に QuerySet.bulk_create() がクラッシュするバグが修正されました ( #34177 )。 Django 4.1 で、 db_column が設定されたフィールドに対して QuerySet.bulk ... _create() を使用するとクラッシュするバグが修正されました ( #34171 )。 ...
https://man.mtool.work/django/6.1/releases/4.1.4.html
はじめての Django アプリ作成、その 5 7526
はじめての Django アプリ作成、その 5 このチュートリアルは チュートリアル 4 の続きです。Web 投票アプリケーションが完成したので、今度は自動テストを作ってみましょう。 困ったときは: このチュートリアルの実行に問題がある場合は、FAQ の Getting Hel ... い。 /  $ python manage.py shell ...\> py manage.py shell >>> import datetime >>> from django.utils import timezone >>> # create a Question instance with pub_date 30 days in the future >>> future_question = Question ( pub_date = timezone . now () + da ... o.test.TestCase クラス自体がクライアントを持っているため、インポートは不要です)。 >>> from django.test import Client >>> # create an instance of the client for our use >>> client = Client () さて、これでクライアントに仕事を頼む準備ができました。 >>> # ... t reverse そして、question を簡単に作れるようにするショートカット関数と、新しいテストクラスを作ります。 polls/tests.py def create_question ( question_text , days ): """ Create a question with the given `question_text` and published the given number of ...
https://man.mtool.work/django/6.1/intro/tutorial05.html
Django 2.2 リリースノート 7526
Django 2.2 リリースノート April 1, 2019 Django 2.2 へようこそ! このリリースノートでは、 バージョン 2.2 の新機能 と、Django 2.1 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。また、 一部の機能を非推奨 とし ... the Armenian language. 管理コマンド The new --force-color option forces colorization of the command output. inspectdb now creates models for foreign tables on PostgreSQL. inspectdb --include-views now creates models for materialized views on Oracle an ... ectdb --include-partitions option allows creating models for partition tables on PostgreSQL. In older versions, models are created child tables instead the parent. inspectdb now introspects DurationField for Oracle and PostgreSQL, and AutoField for SQL ... database functions, as well as many math database functions . Setting the new ignore_conflicts parameter of QuerySet.bulk_create() to True tells the database to ignore failure to insert rows that fail uniqueness constraints or other checks. The new Ex ...
https://man.mtool.work/django/6.1/releases/2.2.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT