per page, with , order by , clip by
Results of 1 - 10 of about 424 for import (0.009 sec.)
データベース関数 — Django 6.1 ドキュメント 8095
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » データベース関数 ¶ The classes documented below provide a way for users to use functions provided by the underlying database as annotations, aggrega ... ut_field ) [ソース] ¶ 式 expression の結果の型を output_field の型に強制的に変更します。 使用例: >>> from django.db.models import FloatField >>> from django.db.models.functions import Cast >>> Author . objects . create ( age = 25 , name = "Margaret Smi ... 混在するとデータベースエラーになります。 使用例: >>> # Get a screen name from least to most public >>> from django.db.models import Sum >>> from django.db.models.functions import Coalesce >>> Author . objects . create ( name = "Margaret Smith" , goes_by ... の値は、明示的に正しいデータベース型にキャストされない限り、不正な型に変換される可能性があります: >>> from django.db.models import DateTimeField >>> from django.db.models.functions import Cast , Coalesce >>> from django.utils import timezone >>> now = t ...
https://man.mtool.work/django/6.1/ref/models/database-functions.html
データベース関数 — Django 6.1 ドキュメント 8095
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » データベース関数 ¶ The classes documented below provide a way for users to use functions provided by the underlying database as annotations, aggrega ... ut_field ) [ソース] ¶ 式 expression の結果の型を output_field の型に強制的に変更します。 使用例: >>> from django.db.models import FloatField >>> from django.db.models.functions import Cast >>> Author . objects . create ( age = 25 , name = "Margaret Smi ... 混在するとデータベースエラーになります。 使用例: >>> # Get a screen name from least to most public >>> from django.db.models import Sum >>> from django.db.models.functions import Coalesce >>> Author . objects . create ( name = "Margaret Smith" , goes_by ... の値は、明示的に正しいデータベース型にキャストされない限り、不正な型に変換される可能性があります: >>> from django.db.models import DateTimeField >>> from django.db.models.functions import Cast , Coalesce >>> from django.utils import timezone >>> now = t ...
https://man.mtool.work/django/6.1/ref/models/database-functions.html
Coding style — Django 6.1 ドキュメント 7137
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Coding style ¶ Please follow these coding standards when writing code for inclusion in Django. Pre-commit checks ¶ pre-commit is a framework for man ... {**x, **y} ) or sequences ( [*a, *b] ). This improves performance, readability, and maintainability while reducing errors. Imports ¶ Use isort to automate import sorting using the guidelines below. Quick start: /  $ python -m pip install "isort >= 7 ... ort recursively from your current directory, modifying any files that don't conform to the guidelines. If you need to have imports out of order (to avoid a circular import, for example) use a comment like this: import module # isort:skip Put imports in ... omponents, local Django component, try/excepts. Sort lines in each group alphabetically by the full module name. Place all import module statements before from module import objects in each section. Use absolute imports for other Django components and ...
https://man.mtool.work/django/6.1/internals/contributing/writing-code/coding-sty...
Coding style — Django 6.1 ドキュメント 7112
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Coding style ¶ Please follow these coding standards when writing code for inclusion in Django. Pre-commit checks ¶ pre-commit is a framework for man ... {**x, **y} ) or sequences ( [*a, *b] ). This improves performance, readability, and maintainability while reducing errors. Imports ¶ Use isort to automate import sorting using the guidelines below. Quick start: /  $ python -m pip install "isort >= 7 ... ort recursively from your current directory, modifying any files that don't conform to the guidelines. If you need to have imports out of order (to avoid a circular import, for example) use a comment like this: import module # isort:skip Put imports in ... omponents, local Django component, try/excepts. Sort lines in each group alphabetically by the full module name. Place all import module statements before from module import objects in each section. Use absolute imports for other Django components and ...
https://man.mtool.work/django/6.1/internals/contributing/writing-code/coding-sty...
フォームセット (Formset) — Django 6.1 ドキュメント 6473
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » フォームセット (Formset) ¶ class BaseFormSet [ソース] ¶ フォームセットは、同じページで複数のフォームを扱うための抽象レイヤーです。データグリッドに例 ... えるとわかりやすいでしょう。次のようなフォームがあるとしましょう: >>> from django import forms >>> class ArticleForm ( forms . Form ): ... title = forms . CharField () ... pub_date = forms . DateField () ... ユー ... 成できるようにしたいと思うかもしれません。 ArticleForm からフォームセットを作るには、次のようにします: >>> from django.forms import formset_factory >>> ArticleFormSet = formset_factory ( ArticleForm ) これで ArticleFormSet という名前のフォームセットクラス ... セットが初期データから生成するフォームに加え、追加で表示するフォームの数を指定することを意味します。例を見てみましょう: >>> import datetime >>> from django.forms import formset_factory >>> from myapp.forms import ArticleForm >>> ArticleFormSet = formset ...
https://man.mtool.work/django/6.1/topics/forms/formsets.html
翻訳 — Django 6.1 ドキュメント 6473
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 翻訳 ¶ 概要 ¶ Django プロジェクトを翻訳可能にするためには、Python コードやテンプレートに、多少のフックを加筆しなければなりません。このフックは 翻訳文 ... のため、グローバル名前空間に _() をインストールすると、干渉して問題を引き起こします。 gettext() を _() という名前で明示的に import すれば、この問題を回避できます。 _ として別名をつけられる関数は? ( makemessages で使われる) xgettext が動作する方法のせいで ... 、単一の文字列引数を持つ関数のみが _ として import できます。 gettext() gettext_lazy() この例では、 "Welcome to my site." というテキストが翻訳文字列としてマークされています: ... from django.http import HttpResponse from django.utils.translation import gettext as _ def my_view ( request ): output = _ ( "Welcome to my site." ...
https://man.mtool.work/django/6.1/topics/i18n/translation.html
フォームセット (Formset) — Django 6.1 ドキュメント 6473
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » フォームセット (Formset) ¶ class BaseFormSet [ソース] ¶ フォームセットは、同じページで複数のフォームを扱うための抽象レイヤーです。データグリッドに例 ... えるとわかりやすいでしょう。次のようなフォームがあるとしましょう: >>> from django import forms >>> class ArticleForm ( forms . Form ): ... title = forms . CharField () ... pub_date = forms . DateField () ... ユー ... 成できるようにしたいと思うかもしれません。 ArticleForm からフォームセットを作るには、次のようにします: >>> from django.forms import formset_factory >>> ArticleFormSet = formset_factory ( ArticleForm ) これで ArticleFormSet という名前のフォームセットクラス ... セットが初期データから生成するフォームに加え、追加で表示するフォームの数を指定することを意味します。例を見てみましょう: >>> import datetime >>> from django.forms import formset_factory >>> from myapp.forms import ArticleForm >>> ArticleFormSet = formset ...
https://man.mtool.work/django/6.1/topics/forms/formsets.html
翻訳 — Django 6.1 ドキュメント 6473
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 翻訳 ¶ 概要 ¶ Django プロジェクトを翻訳可能にするためには、Python コードやテンプレートに、多少のフックを加筆しなければなりません。このフックは 翻訳文 ... のため、グローバル名前空間に _() をインストールすると、干渉して問題を引き起こします。 gettext() を _() という名前で明示的に import すれば、この問題を回避できます。 _ として別名をつけられる関数は? ( makemessages で使われる) xgettext が動作する方法のせいで ... 、単一の文字列引数を持つ関数のみが _ として import できます。 gettext() gettext_lazy() この例では、 "Welcome to my site." というテキストが翻訳文字列としてマークされています: ... from django.http import HttpResponse from django.utils.translation import gettext as _ def my_view ( request ): output = _ ( "Welcome to my site." ...
https://man.mtool.work/django/6.1/topics/i18n/translation.html
ジェネリック日付ビュー — Django 6.1 ドキュメント 6439
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » ジェネリック日付ビュー ¶ 日付ベースのジェネリックビュー ( django.views.generic.dates 内で提供されています) は、日付ベースのデータのために、ドリルダウ ... 注釈 このページの例のいくつかは、 myapp/models.py 内で下記の通り Article モデルが定義されていると仮定します: from django.db import models from django.urls import reverse class Article ( models . Model ): title = models . CharField ( max_length = 200 ) p ... d 属性を用いた月や日に変更できます。これは、すべてのサブクラスのビューに適用されます。 例 myapp/urls.py : from django.urls import path from django.views.generic.dates import ArchiveIndexView from myapp.models import Article urlpatterns = [ path ( "arch ... ます。 ノート デフォルトの template_name_suffix は _archive_year です。 例 myapp/views.py : from django.views.generic.dates import YearArchiveView from myapp.models import Article class ArticleYearArchiveView ( YearArchiveView ): queryset = Article . ob ...
https://man.mtool.work/django/6.1/ref/class-based-views/generic-date-based.html
ジェネリック日付ビュー — Django 6.1 ドキュメント 6406
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » ジェネリック日付ビュー ¶ 日付ベースのジェネリックビュー ( django.views.generic.dates 内で提供されています) は、日付ベースのデータのために、ドリルダウ ... 注釈 このページの例のいくつかは、 myapp/models.py 内で下記の通り Article モデルが定義されていると仮定します: from django.db import models from django.urls import reverse class Article ( models . Model ): title = models . CharField ( max_length = 200 ) p ... d 属性を用いた月や日に変更できます。これは、すべてのサブクラスのビューに適用されます。 例 myapp/urls.py : from django.urls import path from django.views.generic.dates import ArchiveIndexView from myapp.models import Article urlpatterns = [ path ( "arch ... ます。 ノート デフォルトの template_name_suffix は _archive_year です。 例 myapp/views.py : from django.views.generic.dates import YearArchiveView from myapp.models import Article class ArticleYearArchiveView ( YearArchiveView ): queryset = Article . ob ...
https://man.mtool.work/django/6.1/ref/class-based-views/generic-date-based.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT