per page, with , order by , clip by
Results of 1 - 10 of about 200 for instance (0.010 sec.)
モデルインスタンスリファレンス — Django 6.1 ドキュメント 10899
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » モデルインスタンスリファレンス ¶ このドキュメントでは、 Model API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提として ... __init__ method. If you do so, however, take care not to change the calling signature as any change may prevent the model instance from being saved. Additionally, referring to model fields within __init__ may potentially result in infinite recursion err ... fferent type (for example, a string assigned to a UUIDField ) may be converted when save() executes a query, the in-memory instance will keep the original value until it is reloaded . モデルの読み込みをカスタマイズする ¶ classmethod Model. from_db ( db , ... all of the model's fields are present, then values are guaranteed to be in the order __init__() expects them. That is, the instance can be created by cls(*values) . If any fields are deferred, they won't appear in field_names . In that case, assign a val ...
https://man.mtool.work/django/6.1/ref/models/instances.html
モデルインスタンスリファレンス — Django 6.1 ドキュメント 10899
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » モデルインスタンスリファレンス ¶ このドキュメントでは、 Model API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提として ... __init__ method. If you do so, however, take care not to change the calling signature as any change may prevent the model instance from being saved. Additionally, referring to model fields within __init__ may potentially result in infinite recursion err ... fferent type (for example, a string assigned to a UUIDField ) may be converted when save() executes a query, the in-memory instance will keep the original value until it is reloaded . モデルの読み込みをカスタマイズする ¶ classmethod Model. from_db ( db , ... all of the model's fields are present, then values are guaranteed to be in the order __init__() expects them. That is, the instance can be created by cls(*values) . If any fields are deferred, they won't appear in field_names . In that case, assign a val ...
https://man.mtool.work/django/6.1/ref/models/instances.html
モデルからフォームを作成する — Django 6.1 ドキュメント 9813
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » モデルからフォームを作成する ¶ ModelForm ¶ class ModelForm [ソース] ¶ データベース中心のアプリケーションを作成している場合、Django モデルに密接にマッ ... # Creating a form to change an existing article. >>> article = Article . objects . get ( pk = 1 ) >>> form = ArticleForm ( instance = article ) フィールドの型 ¶ 生成された Form クラスは、指定された全てのモデルフィールドに対して、 fields 属性で指定された順 ... ドをオーバーライドして、バリデーションの動作を追加できます。 モデルのオブジェクトに付属したモデルフォームのインスタンスは、 instance 属性を持ち、メソッドが特定のモデルのインスタンスにアクセスできるようにします。 警告 The ModelForm.clean() method sets flag ... は、フォームに結びつけられたデータからデータベースオブジェクトを生成して保存します。 ModelForm のサブクラスはキーワード引数 instance として既存のモデルインスタンスを受け取ることができます; これが指定されると、 save() はそのインスタンスを更新するようになり ...
https://man.mtool.work/django/6.1/topics/forms/modelforms.html
モデルからフォームを作成する — Django 6.1 ドキュメント 9813
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » モデルからフォームを作成する ¶ ModelForm ¶ class ModelForm [ソース] ¶ データベース中心のアプリケーションを作成している場合、Django モデルに密接にマッ ... # Creating a form to change an existing article. >>> article = Article . objects . get ( pk = 1 ) >>> form = ArticleForm ( instance = article ) フィールドの型 ¶ 生成された Form クラスは、指定された全てのモデルフィールドに対して、 fields 属性で指定された順 ... ドをオーバーライドして、バリデーションの動作を追加できます。 モデルのオブジェクトに付属したモデルフォームのインスタンスは、 instance 属性を持ち、メソッドが特定のモデルのインスタンスにアクセスできるようにします。 警告 The ModelForm.clean() method sets flag ... は、フォームに結びつけられたデータからデータベースオブジェクトを生成して保存します。 ModelForm のサブクラスはキーワード引数 instance として既存のモデルインスタンスを受け取ることができます; これが指定されると、 save() はそのインスタンスを更新するようになり ...
https://man.mtool.work/django/6.1/topics/forms/modelforms.html
Fetch modes — Django 6.1 ドキュメント 8513
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Fetch modes ¶ New in Django 6.1. When accessing model fields that were not loaded as part of the original query, Django will fetch that field's data ... ith a fetch mode , making it more efficient or even blocking it. Use QuerySet.fetch_mode() to set the fetch mode for model instances fetched by a QuerySet : from django.db import models books = Book . objects . fetch_mode ( models . FETCH_PEERS ) Fetch m ... d with QuerySet.defer() or QuerySet.only() ジェネリックリレーション(汎用リレーション) Django copies the fetch mode of an instance to any related objects it fetches, so the mode applies to a whole tree of relationships, not just the top-level model in t ... dels . CASCADE ) ... …and this loop: for book in books : print ( book . author . name ) …where books is a QuerySet of Book instances using some fetch mode. FETCH_ONE ¶ Fetches the missing field for the current instance only. This is the default mode. Usi ...
https://man.mtool.work/django/6.1/topics/db/fetch-modes.html
メールを送信する — Django 6.1 ドキュメント 8513
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » メールを送信する ¶ Django provides wrappers for Python's email and smtplib modules to simplify composing and sending email. Django's email framework ... render_to_string ( "templates/emails/my_email.html" , context = { "my_variable" : 42 }, ) # Then, create a multipart email instance. msg = EmailMultiAlternatives ( subject = "Subject here" , body = text_content , from_email = "from@example.com" , to = [ ... .com" ], headers = { "List-Unsubscribe" : "<mailto:unsub@example.com>" }, ) # Lastly, attach the HTML content to the email instance and send. msg . attach_alternative ( html_content , "text/html" ) msg . send () Configuring email ¶ New Django projects ar ... se advanced features, such as BCC'ed recipients, file attachments, or multi-part email, you'll need to create EmailMessage instances directly. 注釈 This is a design feature. send_mail() and related functions were originally the only interface Django prov ...
https://man.mtool.work/django/6.1/topics/email.html
メールを送信する — Django 6.1 ドキュメント 8405
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » メールを送信する ¶ Django provides wrappers for Python's email and smtplib modules to simplify composing and sending email. Django's email framework ... render_to_string ( "templates/emails/my_email.html" , context = { "my_variable" : 42 }, ) # Then, create a multipart email instance. msg = EmailMultiAlternatives ( subject = "Subject here" , body = text_content , from_email = "from@example.com" , to = [ ... .com" ], headers = { "List-Unsubscribe" : "<mailto:unsub@example.com>" }, ) # Lastly, attach the HTML content to the email instance and send. msg . attach_alternative ( html_content , "text/html" ) msg . send () Configuring email ¶ New Django projects ar ... se advanced features, such as BCC'ed recipients, file attachments, or multi-part email, you'll need to create EmailMessage instances directly. 注釈 This is a design feature. send_mail() and related functions were originally the only interface Django prov ...
https://man.mtool.work/django/6.1/topics/email.html
Django 1.8 リリースノート — Django 6.1 ドキュメント 8083
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django 1.8 リリースノート ¶ April 1, 2015 Django 1.8 へようこそ! このリリースノートでは、 バージョン 1.8 の新機能 と、Django 1.7 以前からアップグレー ... as been cleaned and validated, the UploadedFile object will have an additional image attribute containing the Pillow Image instance used to check if the file was a valid image. It will also update UploadedFile.content_type with the image's content type a ... he database, which can lead to somewhat complex queries involving nested REPLACE function calls. You can now refresh model instances by using Model.refresh_from_db() . You can now get the set of deferred fields for a model using Model.get_deferred_fields ... a Uniform Resource Identifier (URI) properly. HttpResponse now implements a few additional methods like getvalue() so that instances can be used as stream objects. The new HttpResponse.setdefault() method allows setting a header unless it has already bee ...
https://man.mtool.work/django/6.1/releases/1.8.html
Django 1.8 リリースノート — Django 6.1 ドキュメント 8083
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django 1.8 リリースノート ¶ April 1, 2015 Django 1.8 へようこそ! このリリースノートでは、 バージョン 1.8 の新機能 と、Django 1.7 以前からアップグレー ... as been cleaned and validated, the UploadedFile object will have an additional image attribute containing the Pillow Image instance used to check if the file was a valid image. It will also update UploadedFile.content_type with the image's content type a ... he database, which can lead to somewhat complex queries involving nested REPLACE function calls. You can now refresh model instances by using Model.refresh_from_db() . You can now get the set of deferred fields for a model using Model.get_deferred_fields ... a Uniform Resource Identifier (URI) properly. HttpResponse now implements a few additional methods like getvalue() so that instances can be used as stream objects. The new HttpResponse.setdefault() method allows setting a header unless it has already bee ...
https://man.mtool.work/django/6.1/releases/1.8.html
Fetch modes — Django 6.1 ドキュメント 7545
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Fetch modes ¶ New in Django 6.1. When accessing model fields that were not loaded as part of the original query, Django will fetch that field's data ... ith a fetch mode , making it more efficient or even blocking it. Use QuerySet.fetch_mode() to set the fetch mode for model instances fetched by a QuerySet : from django.db import models books = Book . objects . fetch_mode ( models . FETCH_PEERS ) Fetch m ... d with QuerySet.defer() or QuerySet.only() ジェネリックリレーション(汎用リレーション) Django copies the fetch mode of an instance to any related objects it fetches, so the mode applies to a whole tree of relationships, not just the top-level model in t ... dels . CASCADE ) ... …and this loop: for book in books : print ( book . author . name ) …where books is a QuerySet of Book instances using some fetch mode. FETCH_ONE ¶ Fetches the missing field for the current instance only. This is the default mode. Usi ...
https://man.mtool.work/django/6.1/topics/db/fetch-modes.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT