per page, with , order by , clip by
Results of 1 - 10 of about 196 for fields (0.010 sec.)
システムチェックフレームワーク 11095
システムチェックフレームワーク システムチェックフレームワークは、Django プロジェクトを検証するための静的チェックのセットです。一般的な問題を検出し、それらを修正するヒントを提供します。このフレームワークは拡張性があり、独自のチェックを簡単に ... 設定を検証します。 files.E001 : FILE_UPLOAD_TEMP_DIR 設定は存在しないディレクトリ <path> を参照しています。 モデルフィールド fields.E001 : フィールド名はアンダースコアで終わってはいけません。 fields.E002 : フィールド名には "__" を含めることはできません。 ... fields.E003 : pk はフィールド名として使用できない予約語です。 fields.E004 : choices must be a mapping (e.g. a dictionary) or an o ... rdered iterable (e.g. a list or tuple, but not a set). fields.E005 : choices は実際の値と人間が読める名前のマッピング、または (実際の値, 人間が読める名前) タプルを含むイテラブルでなけれ ...
https://man.mtool.work/django/6.1/ref/checks.html
モデル _meta API 11095
モデル _meta API class Options [ソース] モデルの _meta API は、Django ORM のコアにあります。これにより、ルックアップ、クエリ、フォーム、admin などのシステムの他のパーツは、各モデルの機能を理解できるようになります。API は、各モデルクラスの _ ... ザーが設定した related_query_name 、ユーザーが設定した related_name 、Django が自動生成した名前のいずれかになります。 Hidden fields, fields with hidden=True , cannot be retrieved by name. 与えられた名前のフィールドが見つからなかったときは、 FieldDoesNotE ... jango.contrib.auth.models import User # A field on the model >>> User . _meta . get_field ( "username" ) <django.db.models.fields.CharField: username> # A field from another model that has a relation with the current model >>> User . _meta . get_field ... FieldDoesNotExist : User has no field named 'does_not_exist' モデルのすべてのフィールドインスタンスを取得する Options. get_fields ( include_parents = True , include_hidden = False ) [ソース] モデルに関連するフィールドのタプルを返します。 get_fields() は ...
https://man.mtool.work/django/6.1/ref/models/meta.html
Django の admin サイト 9873
Django の admin サイト Django のパワフルな特徴の1つは、自動的に生成される admin インタフェースです。あなたのモデルクラスからメタデータを読み取り、モデル中心のインタフェースを提供します。このインタフェースのおかげで、ユーザはあなたのサイトの ... , null = True ) Author モデルに対するフォームが name と title の 2 つのフィールドのみを含むようにしたい場合、以下のように fields か exclude を指定することになります: from django.contrib import admin class AuthorAdmin ( admin . ModelAdmin ): fields = [ ... ate ) しか持っていないので、上記の宣言によって生成されるフォームはまったく同じフィールドを持つことになります。 ModelAdmin. fields "add" と "change" 上のフォームでシンプルなレイアウト変更 (有効なフィールドのみ表示、順序の変更、行のグルーピングなど) を行 ... うには、 fields オプションを使用してください。たとえば、以下のように、 django.contrib.flatpages.models.FlatPage モデルに対して admin フォー ...
https://man.mtool.work/django/6.1/ref/contrib/admin/
Django 1.6 リリースノート 9787
Django 1.6 リリースノート 注釈 Dedicated to Malcolm Tredinnick On March 17, 2013, the Django project and the free software community lost a very dear friend and developer. Malcolm was a long-time contributor to Django, a model community mem ... aryField model field allows storage of raw binary data in the database. GeoDjango form widgets GeoDjango now provides form fields and widgets for its geo-specialized fields. They are OpenLayers-based by default, but they can be customized to use any ot ... e to erratic support of the number input type with localized numbers in current browsers, Django only uses it when numeric fields are not localized. The number argument for lazy plural translations can be provided at translation time rather than at def ... he admin. The documentation contains a deployment checklist . The diffsettings command gained a --all option. django.forms.fields.Field.__init__ now calls super() , allowing field mixins to implement __init__() methods that will reliably be called. The ...
https://man.mtool.work/django/6.1/releases/1.6.html
モデルインスタンスリファレンス 9506
モデルインスタンスリファレンス このドキュメントでは、 Model API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提としていますので、このドキュメントを読む前にこの 2 つを読んでおいた方がよいでしょう。 このリファレン ... on クラスと同様にインスタンス化してください: class Model ( ** kwargs ) [ソース] The keyword arguments are the names of the fields you've defined on your model. Note that instantiating a model in no way touches your database; for that, you need to save( ... ange 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 errors in some circumstances. Rather than overriding __init__ ... gument contains the database alias for the database the model is loaded from, field_names contains the names of all loaded fields, and values contains the loaded values for each field in field_names . The field_names are in the same order as the values ...
https://man.mtool.work/django/6.1/ref/models/instances.html
モデルフォーム 8813
モデルフォーム ModelForm API リファレンス。 ModelForm の使用に関する入門的な資料は、トピックガイドの モデルからフォームを作成する を参照してください。 モデルフォームの Meta API class ModelFormOptions [ソース] The _meta API is used to build ... 。 from django.forms import ModelForm from myapp.models import Book class BookForm ( ModelForm ): class Meta : model = Book fields = [ "title" , "author" ] help_texts = { "title" : "The title of the book" , "author" : "The author of the book" , } # ... ... other attributes 必要な属性は、まず model と、それから fields または exclude のいずれかです。その他の Meta 属性の設定は任意です。 localized_fields と formfield_callback を除く設定任意の ... ーメッセージを適用します。 exclude ModelFormOptions. exclude フォームから除外する model のフィールド名のタプルまたはリスト。 fields または exclude のいずれかの設定が必要です。どちらも設定されない場合は ImproperlyConfigured 例外が送出されます。 exclude を ...
https://man.mtool.work/django/6.1/ref/forms/models.html
モデルからフォームを作成する 8738
モデルからフォームを作成する ModelForm class ModelForm [ソース] データベース中心のアプリケーションを作成している場合、Django モデルに密接にマップするフォームを使うことになるでしょう。例えば、 BlogComment モデルを持っていて、閲覧者がコメント ... dels import Article # Create the form class. >>> class ArticleForm ( ModelForm ): ... class Meta : ... model = Article ... fields = [ "pub_date" , "headline" , "content" , "reporter" ] ... # Creating a form to add an article. >>> form = ArticleForm () ... m = ArticleForm ( instance = article ) フィールドの型 生成された Form クラスは、指定された全てのモデルフィールドに対して、 fields 属性で指定された順番でフォームフィールドを有します。 各モデルフィールドは、対応するデフォルトのフォームフィールドを持ちます ... Field (以下を参照) PositiveBigIntegerField IntegerField PositiveIntegerField IntegerField PositiveSmallIntegerField IntegerField SlugField SlugField SmallAutoField フォーム上では表示されません。 SmallIntegerField IntegerField TextField CharField で wid ...
https://man.mtool.work/django/6.1/topics/forms/modelforms.html
複合主キー 8413
複合主キー Django では、すべてのモデルに主キーが存在します。デフォルトでは、この主キーは単一のフィールドで構成されます。 ほとんどの場合、単一の主キーで十分です。しかし、データベース設計においては、複数のフィールドからなる主キーが必要になるこ ... _product_id = models . IntegerField () item = models . ForeignObject ( OrderLineItem , on_delete = models . CASCADE , from_fields = ( "item_order_id" , "item_product_id" ), to_fields = ( "order_id" , "product_id" ), ) ForeignObject は ForeignKey によく ... ば、次のようなフォームを考えてみましょう: class OrderLineItemForm ( forms . ModelForm ): class Meta : model = OrderLineItem fields = "__all__" このフォームには、複合主キーのための pk フィールドは含まれません: >>> OrderLineItemForm () <OrderLineItemForm ... bound=False, valid=Unknown, fields=(product;order;quantity)> 複合主キーである pk をフォームフィールドとして指定しようとすると、存在しないフィールドとして Fie ...
https://man.mtool.work/django/6.1/topics/composite-primary-key.html
Django オブジェクトのシリアライズ 8283
Django オブジェクトのシリアライズ Django のシリアライズフレームワークは、Django のモデルを他のフォーマットに「翻訳」する仕組みを提供します。通常、このような他のフォーマットはテキストベースや Django データをネットワーク越しに送信するために使 ... 例外が発生します。 フィールドのサブセット フィールドのサブセットのみをシリアライズしたい場合は、次のようにシリアライザーに fields 引数を指定できます。 from django.core import serializers data = serializers . serialize ( "json" , SomeModel . objects . a ... ll (), fields = [ "name" , "size" ]) この例では、各モデルの name と size 属性だけがシリアライズされます。主キーは常に出力結果内の pk 要素 ... としてシリアライズされ、 fields 部分には決して現れません。 注釈 モデルによってはフィールドのサブセットだけをシリアライズしたモデルをデシリアライズすること ...
https://man.mtool.work/django/6.1/topics/serialization.html
Django 1.7 リリースノート 7559
Django 1.7 リリースノート September 2, 2014 Django 1.7 へようこそ! このリリースノートでは、 バージョン 1.7 の新機能 と、Django 1.6 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した ... stic and straightforward process. This should make it easier to diagnose import issues such as import loops. New method on Field subclasses To help power both schema migrations and to enable easier addition of composite keys in future releases of Djang ... to be copied safely, both essential parts of these new features. This change should not affect you unless you write custom Field subclasses; if you do, you may need to reimplement the deconstruct() method if your subclass changes the method signature o ... init__ , no changes are necessary. If you do need to override deconstruct() , a good place to start is the built-in Django fields ( django/db/models/fields/__init__.py ) as several fields, including DecimalField and DateField , override it and show how ...
https://man.mtool.work/django/6.1/releases/1.7.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT