per page, with , order by , clip by
Results of 1 - 10 of about 40 for pages (0.005 sec.)
アグリゲーション (集計) 14556
アグリゲーション (集計) Djangoのデータベース抽象API のトピックガイドでは、個別のオブジェクトの作成、取得、削除を行うDjangoのクエリの使い方を説明しました。しかし、オブジェクトのコレクションを 集計 (アグリゲーション) した値や、集計することによ ... me = models . CharField ( max_length = 300 ) class Book ( models . Model ): name = models . CharField ( max_length = 300 ) pages = models . IntegerField () price = models . DecimalField ( max_digits = 10 , decimal_places = 2 ) rating = models . FloatF ... k の逆多対多のホップを指定するために 'book' を使用していることに注意してください): >>> Author . objects . annotate ( total_pages = Sum ( "book__pages" )) ( QuerySet に含まれる Author は total_pages 属性を持ちます。別名が指定されなければ、 book__pages_ ... . Take the following example: >>> from django.db.models import F , Count , Greatest >>> Book . objects . values ( greatest_pages = Greatest ( "pages" , 600 )) . annotate ( ... num_authors = Count ( "authors" ), ... pages_per_author = F ( "greatest_pag ...
https://man.mtool.work/django/6.1/topics/db/aggregation.html
PostgreSQL 固有のクエリ式 12403
PostgreSQL 固有のクエリ式 これらの式は django.contrib.postgres.expressions モジュールから利用できます。 ArraySubquery() 式 class ArraySubquery ( queryset ) [ソース] ArraySubquery は、PostgreSQL の ARRAY コンストラクタを使用してクエリセットか ... ery >>> books = Book . objects . filter ( author = OuterRef ( "pk" )) . values ( ... json = JSONObject ( title = "title" , pages = "pages" ) ... ) >>> author = Author . objects . annotate ( books = ArraySubquery ( books )) . first () >>> author . book ... s [{'title': 'Solaris', 'pages': 204}, {'title': 'The Cyberiad', 'pages': 295}] ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/expressions.html
ページ分割 (Paginator) 10391
ページ分割 (Paginator) Django はページ分割されたデータを管理するのに役立ついくつかのクラスを提供しています。これらのクラスは django/core/paginator.py にあります。 例については ページ分割 (Pagination) のトピックガイド を参照してください。 Pa ... of leaving the items on a page by themselves. For example, with 23 items, per_page=10 , and orphans=3 , there will be two pages; the first page with 10 items and the second (and last) page with 13 items. orphans defaults to zero, which means pages ar ... ach_side = 3 , on_ends = 2 ) [ソース] Paginator.page_range に似た1から始まるページ番号のリストを返しますが、 Paginator.num_pages が大きい場合は、現在のページ番号のどちらか一方または両方に省略記号を追加します。 現在のページ番号の両側に含めるページ数は ... st) を使用します。これにより、 QuerySet などのオブジェクトは、より効率的な count() メソッドを使用できます。 Paginator. num_pages [ソース] トータルのページ数 Paginator. page_range [ソース] 1から始まるページ数の範囲のイテレータです。たとえば、 [1, 2, 3, ...
https://man.mtool.work/django/6.1/ref/paginator.html
ページ分割 (Pagination) 9766
ページ分割 (Pagination) Django は、ページ分割 (ページネーション) されたデータを管理するための高レベルと低レベルの方法を提供しています。つまり、"前へ/次へ" リンクを持つ、複数のページに分割されたデータです。 Paginator クラス 内部では、ページ分 ... nator >>> objects = [ "john" , "paul" , "george" , "ringo" ] >>> p = Paginator ( objects , 2 ) >>> p . count 4 >>> p . num_pages 2 >>> type ( p . page_range ) <class 'range'> >>> p . page_range range(1, 3) >>> page1 = p . page ( 1 ) >>> page1 <Page 1 ... ge2 . object_list ['george', 'ringo'] >>> page2 . has_next () False >>> page2 . has_previous () True >>> page2 . has_other_pages () True >>> page2 . next_page_number () Traceback (most recent call last): ... EmptyPage : That page contains no results > ... mber }} " > previous </ a > {% endif %} < span class = "current" > Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }} . </ span > {% if page_obj.has_next %} < a href = "?page= {{ page_obj.next_page_number }} " > next </ a > < a href = "? ...
https://man.mtool.work/django/6.1/topics/pagination.html
フラットページ (flatpages) アプリ 9252
フラットページ (flatpages) アプリ Django にはオプションで "flatpages" アプリケーションが付属しています。これを使えば、"フラットな" HTML コンテンツをデータベースに保存することができ、 Django のadmin インタフェースや Python API を使って管理で ... ンツフィールドは空のままにしておくこともできます。カスタムテンプレートにコンテンツを入れる場合に便利です。 インストール flatpages アプリをインストールするには、以下の手順に従ってください: もし設定にまだ含まれていない場合は、 'django.contrib.sites' をあ ... s フレームワークを使用している場合は、別のサイトの ID になる可能性があります) 。 INSTALLED_APPS 設定に 'django.contrib.flatpages' を追加してください。 そして、下記のいずれかを行います: URLconf にエントリを追加します。例えば、次のようにします: urlpatte ... rns = [ path ( "pages/" , include ( "django.contrib.flatpages.urls" )), ] または: django.contrib.flatpages.middleware.FlatpageFallbackMiddleware ...
https://man.mtool.work/django/6.1/ref/contrib/flatpages.html
Django 1.11.6 リリースノート 8503
Django 1.11.6 リリースノート October 5, 2017 Django 1.11.6 fixes several bugs in 1.11.5. バグ修正 Made the CharField form field convert whitespace-only values to the empty_value when strip is enabled ( #28555 ). Fixed crash when using the n ... re a custom view error handler such as handler404 that accesses csrf_token could cause CSRF verification failures on other pages ( #28488 ). ...
https://man.mtool.work/django/6.1/releases/1.11.6.html
Django 3.2.8 リリースノート 8503
Django 3.2.8 リリースノート October 5, 2021 Django 3.2.8 fixes two bugs in 3.2.7. バグ修正 Fixed a bug in Django 3.2 that caused incorrect links on read-only fields in the admin ( #33077 ). Fixed a regression in Django 3.2 that caused incor ... rect selection of items across all pages when actions were placed both on the top and bottom of the admin change-list view ( #33083 ). ...
https://man.mtool.work/django/6.1/releases/3.2.8.html
Coding style 8253
Coding style Please follow these coding standards when writing code for inclusion in Django. Pre-commit checks pre-commit is a framework for managing pre-commit hooks. These hooks help to identify simple issues before committing code for re ... e first non-comment line. Do this: {% extends "base.html" %} {% block content %} < h1 class = "font-semibold text-xl" > {{ pages.title }} </ h1 > {% endblock content %} Or this: {# This is a comment #} {% extends "base.html" %} {% block content %} < h ... 1 class = "font-semibold text-xl" > {{ pages.title }} </ h1 > {% endblock content %} Don't do this: {% load i18n %} {% extends "base.html" %} {% block content %} < h1 ... class = "font-semibold text-xl" > {{ pages.title }} </ h1 > {% endblock content %} Put exactly one space between {{ , variable contents, and }} . Do this: {{ user }} ...
https://man.mtool.work/django/6.1/internals/contributing/writing-code/coding-sty...
PostgreSQL 固有のモデルインデックス 7988
PostgreSQL 固有のモデルインデックス 以下はPostgreSQL固有の django.contrib.postgres.indexes モジュールから利用可能な インデックス です。 BloomIndex class BloomIndex ( * expressions , length = None , columns = () , ** options ) [ソース] bloom ... ットで、最大32個の値を持つタプルまたはリストを取ります。 BrinIndex class BrinIndex ( * expressions , autosummarize = None , pages_per_range = None , ** options ) [ソース] BRIN index を作成します。 autosummarize パラメータを True に設定すると、autovacuu ... m による automatic summarization を有効にできます。 pages_per_range 引数は正の整数を取ります。 BTreeIndex class BTreeIndex ( * expressions , fillfactor = None , deduplicate_items = ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/indexes.html
Django 5.2.14 release notes 7988
Django 5.2.14 release notes May 5, 2026 Django 5.2.14 fixes three security issues with severity "low" in 5.2.13. CVE-2026-5766: Potential denial-of-service vulnerability in ASGI requests via file upload limit bypass ASGI requests with a mis ... This issue has severity "low" according to the Django security policy . CVE-2026-35192: Session fixation via public cached pages and SESSION_SAVE_EVERY_REQUEST Response headers did not vary on cookies if a session was not modified, but SESSION_SAVE_EV ...
https://man.mtool.work/django/6.1/releases/5.2.14.html
PREV 1 2 3 4 NEXT