per page, with , order by , clip by
Results of 1 - 10 of about 142 for init (0.005 sec.)
シグナル — Django 6.1 ドキュメント 11525
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » シグナル ¶ Djangoが送信する全てのシグナルのリストです。全ての組み込みシグナルは send() メソッドを使用して送信されます。 参考 シグナルの登録方法と受信 ... モデルのシグナルを使用する前に モデルメソッドをオーバーライド することを検討してください。 警告 これらのシグナルの多くは、 __init__() や save() のような、自分のコードでオーバーライドできる様々なモデルメソッドによって送信されます。 これらのメソッドをモデ ... lls.Question' として参照できます。この種の参照は、循環インポートの依存関係や交換可能なモデルを扱う際に非常に便利です。 pre_init ¶ django.db.models.signals. pre_init ¶ Django モデルをインスタンス化するたびに、このシグナルはモデルの __init__() メソッド ... されます。 このシグナルとともに送信される引数は以下の通りです: sender たった今インスタンスが作成されたモデルクラス。 args __init__() に渡される位置引数のリストです。 kwargs __init__() に渡されるキーワード引数の辞書。 例えば、 チュートリアル にはこのよ ...
https://man.mtool.work/django/6.1/ref/signals.html
シグナル — Django 6.1 ドキュメント 11407
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » シグナル ¶ Djangoが送信する全てのシグナルのリストです。全ての組み込みシグナルは send() メソッドを使用して送信されます。 参考 シグナルの登録方法と受信 ... モデルのシグナルを使用する前に モデルメソッドをオーバーライド することを検討してください。 警告 これらのシグナルの多くは、 __init__() や save() のような、自分のコードでオーバーライドできる様々なモデルメソッドによって送信されます。 これらのメソッドをモデ ... lls.Question' として参照できます。この種の参照は、循環インポートの依存関係や交換可能なモデルを扱う際に非常に便利です。 pre_init ¶ django.db.models.signals. pre_init ¶ Django モデルをインスタンス化するたびに、このシグナルはモデルの __init__() メソッド ... されます。 このシグナルとともに送信される引数は以下の通りです: sender たった今インスタンスが作成されたモデルクラス。 args __init__() に渡される位置引数のリストです。 kwargs __init__() に渡されるキーワード引数の辞書。 例えば、 チュートリアル にはこのよ ...
https://man.mtool.work/django/6.1/ref/signals.html
カスタムのモデルフィールドを作成する — Django 6.1 ドキュメント 10540
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » カスタムのモデルフィールドを作成する ¶ はじめに ¶ モデルリファレンス ドキュメントでは、Djangoの標準フィールドクラスである、 CharField や、 DateField ... rth , east , south and west . Our class looks something like this: class Hand : """A hand of cards (bridge style)""" def __init__ ( self , north , east , south , west ): # Input parameters are lists of cards ('Ah', '9s', etc.) self . north = north se ... eld クラスをサブクラス化すべきです。 新しいフィールドの初期化は、ケース固有の引数を共通の引数から分離し、後者を Field の __init__() メソッドに渡すことです。 (または親クラスに対して)。 この例では、フィールドを HandField と呼ぶことにします。( Field ... ます。 from django.db import models class HandField ( models . Field ): description = "A hand of cards (bridge style)" def __init__ ( self , * args , ** kwargs ): kwargs [ "max_length" ] = 104 super () . __init__ ( * args , ** kwargs ) 私たちの HandFie ...
https://man.mtool.work/django/6.1/howto/custom-model-fields.html
カスタムのモデルフィールドを作成する — Django 6.1 ドキュメント 10540
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » カスタムのモデルフィールドを作成する ¶ はじめに ¶ モデルリファレンス ドキュメントでは、Djangoの標準フィールドクラスである、 CharField や、 DateField ... rth , east , south and west . Our class looks something like this: class Hand : """A hand of cards (bridge style)""" def __init__ ( self , north , east , south , west ): # Input parameters are lists of cards ('Ah', '9s', etc.) self . north = north se ... eld クラスをサブクラス化すべきです。 新しいフィールドの初期化は、ケース固有の引数を共通の引数から分離し、後者を Field の __init__() メソッドに渡すことです。 (または親クラスに対して)。 この例では、フィールドを HandField と呼ぶことにします。( Field ... ます。 from django.db import models class HandField ( models . Field ): description = "A hand of cards (bridge style)" def __init__ ( self , * args , ** kwargs ): kwargs [ "max_length" ] = 104 super () . __init__ ( * args , ** kwargs ) 私たちの HandFie ...
https://man.mtool.work/django/6.1/howto/custom-model-fields.html
カスタム django-admin コマンドの作り方 — Django 6.1 ドキュメント 8059
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » カスタム django-admin コマンドの作り方 ¶ manage.py を用いることで独自のアクションを登録する事ができます。例として、あなたが配布している Django アプリ ... oは、そのディレクトリ内のアンダーバーで始まらないPythonモジュールすべてを manage.py コマンドに登録します。例えば: polls/ __init__.py models.py management/ __init__.py commands/ __init__.py _private.py closepoll.py tests.py views.py この例では、 close ... dle() メソッドだけは、実装する必要があります。 サブクラス内でのコンストラクタの実装 BaseCommand を継承したサブクラス内で __init__ を実装する場合、 BaseCommand の __init__ を呼び出す必要があります: class Command ( BaseCommand ): def __init__ ( self , ... * args , ** kwargs ): super () . __init__ ( * args , ** kwargs ) # ... BaseCommand. create_parser ( prog_name , subcommand , ** kwargs ) [ソース] ¶ CommandParser ...
https://man.mtool.work/django/6.1/howto/custom-management-commands.html
はじめての Django アプリ作成、その 1 — Django 6.1 ドキュメント 8059
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » はじめての Django アプリ作成、その 1 ¶ さあ、例を交えながら学んでゆきましょう。 このチュートリアルでは、簡単な投票 (poll) アプリケーションの作成に取 ... 衝突します) を使わないようにしましょう。 startproject が何を作成したかをみてみましょう: djangotutorial/ manage.py mysite/ __init__.py settings.py urls.py asgi.py wsgi.py ファイルはそれぞれ以下のような役割を持っています: manage.py : Django プロジェクト ... 前は、内部のモジュールやパッケージをインポートするために使用するPythonパッケージ名になります(例: mysite.urls )。 mysite/__init__.py : このディレクトリが Python パッケージであることを Python に知らせるための空のファイルです。Python の初心者は、 Pytho ... \> py manage.py startapp polls このコマンドは polls というディレクトリを作成します。中身はこのようになっています: polls/ __init__.py admin.py apps.py migrations/ __init__.py models.py tests.py views.py このディレクトリ構造が、 poll アプリケーションの ...
https://man.mtool.work/django/6.1/intro/tutorial01.html
ミドルウェア (Middleware) — Django 6.1 ドキュメント 8059
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » ミドルウェア (Middleware) ¶ ミドルウェアは、Django のリクエスト/レスポンス処理にフックを加えるためのフレームワークです。これは、Django の入力あるいは ... ドルウェアは、以下のように関数として書くことができます: def simple_middleware ( get_response ): # One-time configuration and initialization. def middleware ( request ): # Code to be executed for each request before # the view (and later middleware) are ... nse return middleware もしくは、インスタンスを呼び出し可能なクラスとして書くこともできます: class SimpleMiddleware : def __init__ ( self , get_response ): self . get_response = get_response # One-time configuration and initialization. def __call__ ( ... かについての詳細は 非同期サポート を参照してください。 ミドルウェアは、あなたの Ptyhon パスのどこでも使うことができます。 __init__(get_response) ¶ ミドルウェアファクトリは get_response 引数を受け取る必要があります。ミドルウェアに対してグローバルな宣言 ...
https://man.mtool.work/django/6.1/topics/http/middleware.html
独自のテンプレートタグとフィルタを作る — Django 6.1 ドキュメント 7810
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 独自のテンプレートタグとフィルタを作る ¶ Django のテンプレート言語は、アプリケーションのプレゼンテーションロジックのニーズに対応するように設計された ... gs" ディレクトリを含むべきです。まだ存在していない場合は、ディレクトリが Python パッケージとして扱われるようにするため、"__init__.py" を忘れないでください。 開発用サーバが自動的にリスタートしない場合 templatetags モジュールを追加した後、テンプレートで ... 例えば、カスタムタグ/フィルタが poll_extras.py というファイルにある場合、アプリのレイアウトは次のようになります: polls/ __init__.py models.py templatetags/ __init__.py poll_extras.py views.py そして、テンプレートでは次のように使います: {% load poll_ ... ango.utils.safestring import mark_safe register = template . Library () @register . filter ( needs_autoescape = True ) def initial_letter_filter ( text , autoescape = True ): first , other = text [ 0 ], text [ 1 :] if autoescape : esc = conditional_e ...
https://man.mtool.work/django/6.1/howto/custom-template-tags.html
Migrating email to mailers — Django 6.1 ドキュメント 7810
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Migrating email to mailers ¶ Django 6.1 introduced the MAILERS setting, replacing EMAIL_BACKEND and several other EMAIL_* settings. It also introduc ... l backends ¶ Custom EmailBackend implementations may need to be updated for compatibility with mailers. In the backend's __init__() method, accept explicit keyword arguments for all configuration options that can come from "OPTIONS" . Backends that u ... choose), but keyword arguments should take precedence over settings. Accept variable **kwargs and pass them to superclass init. (This will include a new alias argument which must be passed to the superclass.) Ensure that any **kwargs used by the bac ... kend are not passed to superclass init, as that would generate an InvalidMailer error for unknown OPTIONS. Backends must now handle fail_silently themselves, if ...
https://man.mtool.work/django/6.1/howto/mailers-migration.html
クエリ式 (Query Expression) — Django 6.1 ドキュメント 7810
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » クエリ式 (Query Expression) ¶ クエリ式 (query expression) は、update、create、filter、order by、annotation、またはaggregateの一部として使用できる値ま ... eld). function = "SUM" template = " %(function)s ( %(all_values)s%(expressions)s )" allow_distinct = False arity = 1 def __init__ ( self , expression , all_values = False , ** extra ): super () . __init__ ( expression , all_values = "ALL " if all_val ... す。この関数は NULL でない最初のカラムまたは値を返します。 まずはSQL生成に使用するテンプレートと、いくつかの属性を設定する __init__() メソッドを定義します: from django.db.models import Expression class Coalesce ( Expression ): template = "COALESCE( %(e ... xpressions)s )" def __init__ ( self , expressions , output_field ): super () . __init__ ( output_field = output_field ) if len ( expressions ) < 2 : ...
https://man.mtool.work/django/6.1/ref/models/expressions.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT