per page, with , order by , clip by
Results of 1 - 10 of about 107 for Index (0.004 sec.)
モデル index リファレンス 14539
モデル index リファレンス Index クラスを利用すると、データベースのインデックスの作成が簡単になります。インデックスは、 Meta.indexes オプションを使用して追加できます。このドキュメントでは、 index options を含む Index の API リファレンスを説明 ... します。 ビルトインの indexes を参照する Indexes は django.db.models.indexes で定義されていますが、簡単のため、 django.db.models 内にインポートされてい ... ます。 from django.db import models を使用して、indexes を models.<IndexClass> として参照するのが標準的な慣習です。 Index オプション class Index ( * expressions , fields = () , ... asses = () , condition = None , include = None ) [ソース] データベース内にインデックス (B-Tree) を作成します。 expressions Index. expressions 位置引数 *expressions を使用すると、式およびデータベース関数に対して関数インデックスを作成できます。 例: Inde ...
https://man.mtool.work/django/6.1/ref/models/indexes.html
SchemaEditor 12455
SchemaEditor class BaseDatabaseSchemaEditor [ソース] Django のマイグレーションシステムは2つの部分に分かれています。データベースに対してどのような操作を実行するべきかを計算してその結果を保管するロジックの部分 ( django.db.migrations )と、「モ ... model ) [ソース] モデルのテーブルをデータベースから削除し、それに紐づくユニーク制約やインデックスも一緒に削除します。 add_index() BaseDatabaseSchemaEditor. add_index ( model , index ) [ソース] model のテーブルに index を追加します。 remove_index() Ba ... seDatabaseSchemaEditor. remove_index ( model , index ) [ソース] model のテーブルから index を削除します。 rename_index() BaseDatabaseSchemaEditor. rename_index ... ( model , old_index , new_index ) [ソース] model のテーブルの old_index を new_index に名前を変更します。 add_constraint() BaseDatabaseSchemaE ...
https://man.mtool.work/django/6.1/ref/schema-editor.html
はじめての Django アプリ作成、その 3 10153
はじめての Django アプリ作成、その 3 このチュートリアルは チュートリアルその 2 の続きです。ここでは、引続き Web 投票アプリケーションの開発を例にして、公開用のインタフェース、ビュー(view) の作成を焦点に解説します。 困ったときは: このチュート ... つけます。 polls/urls.py from django.urls import path from . import views urlpatterns = [ # ex: /polls/ path ( "" , views . index , name = "index" ), # ex: /polls/5/ path ( "<int:question_id>/" , views . detail , name = "detail" ), # ex: /polls/5/resul ... るいは例外です。 簡単のため、 チュートリアルその 2 で解説した Django のデータベース API を使ってみましょう。試しに次のような index() ビューを作ります。これは、システム上にある最新の 5 件の質問項目をカンマで区切り、日付順に表示するビューです: polls/views ... .py from django.http import HttpResponse from .models import Question def index ( request ): latest_question_list = Question . objects . order_by ( "-pub_date" )[: 5 ] output = ", " . join ([ q . questi ...
https://man.mtool.work/django/6.1/intro/tutorial03.html
テーブル空間(tablespace) 8503
テーブル空間(tablespace) データベースシステムのパフォーマンスを最適化するための一般的なパラダイムは、ディスクレイアウトを整理するためにテーブル空間 tablespaces を使用することです。 警告 Django はテーブル空間を作成しません。テーブル空間の作 ... きないアプリケーションのテーブル空間を設定するのに便利です。 インデックスにテーブル空間を宣言する db_tablespace オプションを Index コンストラクタに渡すことで、インデックスに使用するテーブル空間の名前を指定できます。単一フィールドインデックスの場合、 db_ ... ラムインデックスに使用するテーブル空間を指定できます。カラムにインデックスがない場合、このオプションは無視されます。 DEFAULT_INDEX_TABLESPACE 設定を使って db_tablespace のデフォルト値を指定できます。 db_tablespace が指定されておらず、 DEFAULT_INDEX_TABL ... テーブル空間に作成されます。 例 class TablespaceExample ( models . Model ): name = models . CharField ( max_length = 30 , db_index = True , db_tablespace = "indexes" ) data = models . CharField ( max_length = 255 , db_index = True ) shortcut = models . ...
https://man.mtool.work/django/6.1/topics/db/tablespaces.html
Django 1.11.1 リリースノート 8286
Django 1.11.1 リリースノート May 6, 2017 Django 1.11.1 adds a minor feature and fixes several bugs in 1.11. Allowed disabling server-side cursors on PostgreSQL The change in Django 1.11 to make QuerySet.iterator() use server-side cursors on ... ng in DATABASES . See トランザクションプールとサーバーサイドカーソル for more discussion. バグ修正 Made migrations respect Index 's name argument. If you created a named index with Django 1.11, makemigrations will create a migration to recreate the in ... when models use ForeignKey.to_field ( #28101 ). Fixed crash when overriding the template of django.views.static.directory_index() ( #28122 ). Fixed a regression in formset min_num validation with unchanged forms that have initial data ( #28130 ). Pre ... dering ( #28040 ). Fixed crash in BaseGeometryWidget.get_context() when overriding existing attrs ( #28105 ). Prevented AddIndex and RemoveIndex from mutating model state ( #28043 ). Prevented migrations from dropping database indexes from Meta.indexe ...
https://man.mtool.work/django/6.1/releases/1.11.1.html
サイトマップ・フレームワーク 8209
サイトマップ・フレームワーク Djangoには、 sitemap XML ファイルを作成するための高レベルなサイトマップ生成フレームワークが付属しています。 概要 サイトマップとは、検索エンジンのインデクサーに、ページの変更頻度や、あるページがサイト内の他のペー ... ションごとに1つのサイトマップファイルを参照するサイトマップインデックスを生成することもできます。(下記の Creating a sitemap index を参照してください)。 Sitemap クラスは django.contrib.sitemaps.Sitemap のサブクラスでなければなりません。これらはコードベー ... { "sitemaps" : sitemaps }, name = "django.contrib.sitemaps.views.sitemap" , ), ] サイトマップインデックスを作成する views. index ( request , sitemaps , template_name = 'sitemap_index.xml' , content_type = 'application/xml' , sitemap_url_name = 'django ... 作成する機能もあります。使用上の唯一の違いは下記です: URLconf で 2 つのビューを使用しています: django.contrib.sitemaps.views.index() と django.contrib.sitemaps.views.sitemap() 。 django.contrib.sitemaps.views.sitemap() ビューは、 section キーワード引数を ...
https://man.mtool.work/django/6.1/ref/contrib/sitemaps.html
URL ディスパッチャ 7992
URL ディスパッチャ すっきりした、簡潔で明解な URL スキームは、高品質な Web アプリケーションでは重要な要素です。 Django では、フレームワークの制限なしに、望み通りの URL を設計できます。 URL はすっきりした扱いやすいものにすべきであるという主張 ... g" )), ] # In foo/urls/blog.py from django.urls import path from . import views urlpatterns = [ path ( "" , views . blog . index ), path ( "archive/" , views . blog . archive ), ] 上の例では、取り込まれた "username" 変数はインクルードされたURLconf に渡 ... す。 名前空間の URL は、 ':' 演算子を使って指定します。 たとえば、admin アプリケーションのメインインデックスページは 'admin:index' で参照されます。 これは 'admin' という名前空間と 'index' という名前の URL を示します。 名前空間はネストすることもできます ... 。 名前付きの URL 'sports:polls:index' は、トップレベルの名前空間 'sports' 内で定義されている名前空間 'polls' 内で 'index' と名前がつけられたパターンを探します。 ...
https://man.mtool.work/django/6.1/topics/http/urls.html
はじめての Django アプリ作成、その 5 7775
はじめての Django アプリ作成、その 5 このチュートリアルは チュートリアル 4 の続きです。Web 投票アプリケーションが完成したので、今度は自動テストを作ってみましょう。 困ったときは: このチュートリアルの実行に問題がある場合は、FAQ の Getting Hel ... 'reverse()' rather than a hardcoded URL >>> from django.urls import reverse >>> response = client . get ( reverse ( "polls:index" )) >>> response . status_code 200 >>> response . content b'\n <ul>\n \n <li><a href="/polls/1/">What&#x27;s up?</a></li>\ ... しましょう。 Tutorial 4 では、以下のような ListView : をベースにしたクラスベースビューを導入しました。 polls/views.py class IndexView ( generic . ListView ): template_name = "polls/index.html" context_object_name = "latest_question_list" def get_querys ... delta ( days = days ) return Question . objects . create ( question_text = question_text , pub_date = time ) class QuestionIndexViewTests ( TestCase ): def test_no_questions ( self ): """ If no questions exist, an appropriate message is displayed. """ ...
https://man.mtool.work/django/6.1/intro/tutorial05.html
PostgreSQL 固有のデータベース制約 7775
PostgreSQL 固有のデータベース制約 PostgreSQL は django.contrib.postgres.constraints モジュールから利用できる追加のデータ整合性制約をサポートしています。これらはモデル Meta.constraints オプションで追加されます。 ExclusionConstraint class Exc ... lusionConstraint ( * , name , expressions , index_type = None , condition = None , deferrable = None , include = None , violation_error_code = None , violation_error_messag ... le" , name = "circle_ops" ), RangeOperators . OVERLAPS ), ] これは circle_ops を使用して circle 上に排他制約を作成します。 index_type ExclusionConstraint. index_type The index type of the constraint. Accepted values are GiST , Hash , or SPGiST . Match ... ing is case insensitive. If not provided, the default index type is GIST . Changed in Django 6.1: Support for exclusion constraints using Hash indexes was added. condition ExclusionC ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/constraints.html
制約 (Constraint) リファレンス 7775
制約 (Constraint) リファレンス このモジュールで定義されたクラスはデータベース制約を作成します。これらはモデルの Meta.constraints オプションで追加されます。 組み込みの制約への参照について 制約は django.db.models.constraints で定義されています ... ssage = None ) [ソース] Creates a uniqueness guarantee in the database, enforced by either a unique constraint or a unique index depending on the options used. Constraint vs. index implementation Setting only UniqueConstraint.fields creates a true dat ... raint.expressions , UniqueConstraint.opclasses , UniqueConstraint.condition , or UniqueConstraint.include creates a unique index ( CREATE UNIQUE INDEX ) instead. In this documentation, the term "unique constraint" is used for both cases to mean a uniq ... ィールドの小文字の値を降順で、 category フィールドの値をデフォルトの昇順でユニーク制約を作成します。 関数的なユニーク制約は Index.expressions と同じデータベース制約を持ちます。 fields UniqueConstraint. fields 制約を適用したい一意な列のセットを表すフィー ...
https://man.mtool.work/django/6.1/ref/models/constraints.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT