per page, with , order by , clip by
Results of 1 - 10 of about 19 for attrs (0.005 sec.)
ウィジェット 15367
ウィジェット ウィジェットは、Django が HTML の input 要素の表現方法です。ウィジェットは、HTML のレンダリングをコントロールして、ウィジェットに合致する GET/POST ディクショナリからデータを取り出します。 Built-in widgets によって作られる HTML ... の異なる入力タイプを使用するために、 'type' 属性を指定することも可能です。これを行うには、ウィジェットを作成する際に Widget.attrs 引数を使用します。 class CommentForm ( forms . Form ): name = forms . CharField ( widget = forms . TextInput ( attrs = { " ... class" : "special" })) url = forms . URLField () comment = forms . CharField ( widget = forms . TextInput ( attrs = { "size" : "40" })) フォーム定義内でウィジェットを変更することもできます: class CommentForm ( forms . Form ): name = for ... ms . CharField () url = forms . URLField () comment = forms . CharField () name . widget . attrs . update ({ "class" : "special" }) comment . widget . attrs . update ( size = "40" ) あるいは、フォームに直接フィールドが宣 ...
https://man.mtool.work/django/6.1/ref/forms/widgets.html
フォーム API 10381
フォーム API このドキュメントについて このドキュメントでは、Django のフォーム API の詳細について説明します。このドキュメントを読む前に フォームについての概要 を読むことをおすすめします。 バインドされた (bound) フォームとバインドされていない ... "subject" ] . legend_tag () <legend class="required" for="id_subject">Subject:</legend> >>> f [ "subject" ] . label_tag ( attrs = { "class" : "foo" }) <label for="id_subject" class="foo required">Subject:</label> >>> f [ "subject" ] . legend_tag ( at ... ソース] フィールドをそのヘルプテキストやエラーメッセージと関連付けるための aria-describedby 参照を返します。ただし、 Widget.attrs に aria-describedby がすでに設定されている場合は、ユーザー定義の属性を保持するために None を返します。 BoundField. auto_id ... ォルトでは、これはフィールドの名前に id_ を前につけたものになります(上の例では " id_my_field ")。フィールドのウィジェットの attrs を設定することで、IDを変更できます。例えば、以下のようにフィールドを宣言します: my_field = forms . CharField ( widget = fo ...
https://man.mtool.work/django/6.1/ref/forms/api.html
Django 1.11.3 リリースノート 8435
Django 1.11.3 リリースノート July 1, 2017 Django 1.11.3 fixes several bugs in 1.11.2. バグ修正 Removed an incorrect deprecation warning about a missing renderer argument if a Widget.render() method accepts **kwargs ( #28265 ). Fixed a regre ... n particular, when the login page is accessed directly) ( #28229 ). Prevented attribute values in the django/forms/widgets/attrs.html template from being localized so that numeric attributes (e.g. max and min ) of NumberInput work correctly ( #28303 ) ...
https://man.mtool.work/django/6.1/releases/1.11.3.html
Django 1.11 リリースノート 8435
Django 1.11 リリースノート April 4, 2017 Django 1.11 へようこそ! このリリースノートでは、Django 1.10 および過去のバージョンからアップグレードする際に知っておくべきいくつかの 後方互換性のない変更 に加え、 新機能 を説明しています。 いくつかの ... 削除されました。 IPython 1.0 未満へのサポートが shell コマンドから削除されました。 The signature of private API Widget.build_attrs() changed from extra_attrs=None, **kwargs to base_attrs, extra_attrs=None . File-like objects (e.g., StringIO and BytesIO ...
https://man.mtool.work/django/6.1/releases/1.11.html
Django 1.11.1 リリースノート 8247
Django 1.11.1 リリースノート May 6, 2017 Django 1.11.1 adds a minor feature and fixes several bugs in 1.11. Allowed disabling server-side cursors on PostgreSQL The change in Django 1.11 to make QuerySet.iterator() use server-side cursors on ... o use template-based widget rendering ( #28040 ). Fixed crash in BaseGeometryWidget.get_context() when overriding existing attrs ( #28105 ). Prevented AddIndex and RemoveIndex from mutating model state ( #28043 ). Prevented migrations from dropping da ...
https://man.mtool.work/django/6.1/releases/1.11.1.html
カスタムのモデルフィールドを作成する 8162
カスタムのモデルフィールドを作成する はじめに モデルリファレンス ドキュメントでは、Djangoの標準フィールドクラスである、 CharField や、 DateField などの使い方を説明しています。多くの場合、これらのクラスがあれば十分です。ただし、Djangoのバージ ... nstance . some_attribute , new_instance . some_attribute ) データベースのカラム定義に影響しないフィールド属性 Field.non_db_attrs をオーバーライドすることで、カラム定義に影響しないフィールドの属性をカスタマイズできます。これはモデルのマイグレーションの ... 間に使われ、no-opの AlterField 操作を検出します。 例えば: class CommaSepField ( models . Field ): @property def non_db_attrs ( self ): return super () . non_db_attrs + ( "separator" ,) カスタムフィールドのベースクラスを変更する カスタムフィールドの ...
https://man.mtool.work/django/6.1/howto/custom-model-fields.html
配信 (syndication) フィード フレームワーク 8162
配信 (syndication) フィード フレームワーク Django には、 RSS と Atom フィードを作成するための高レベルな配信 (syndication) フィード生成フレームワークが付属しています。 任意の配信フィードを作成するには、短い Python クラスを書くだけで済みます。 ... ードジェネレーターの実装を次のように始めることができます: class iTunesFeed ( Rss201rev2Feed ): def root_attributes ( self ): attrs = super () . root_attributes () attrs [ "xmlns:itunes" ] = "http://www.itunes.com/dtds/podcast-1.0.dtd" return attrs def a ...
https://man.mtool.work/django/6.1/ref/contrib/syndication.html
フォーム フィールド 8162
フォーム フィールド class Field [ソース] Form クラスを作成時の一番重要な部分は、form のフィールド (field) の定義です。各フィールドにはカスタムの検証ロジックがあり、他にいくつかのフックもあります。 Field. clean ( value ) [ソース] Field クラス ... forms . CharField ( ... max_length = 255 , ... help_text = "e.g., user@example.com" , ... widget = forms . TextInput ( ... attrs = { "aria-describedby" : "custom-description id_username_helptext" }, ... ), ... ) ... >>> f = UserForm () >>> print ( f [ ... s ToppingSelect ( forms . Select ): def create_option ( self , name , value , label , selected , index , subindex = None , attrs = None ): option = super () . create_option ( name , value , label , selected , index , subindex , attrs ) if value : opti ... on [ "attrs" ][ "data-price" ] = value . instance . price return option class PizzaForm ( forms . ModelForm ): class Meta : model = Pi ...
https://man.mtool.work/django/6.1/ref/forms/fields.html
Django 6.1.3 release notes 8162
Django 6.1.3 release notes November 3, 2026 Django 6.1.3 fixes five security issues with severity "low", one security issue with severity "moderate", and several bugs in 6.1.2. It also adds compatibility with Python 3.15. CVE-2026-108147: P ... ikely unintended, since SQL NULL cannot match any value. Fixed a regression in Django 6.1 where legend_tag() with a custom attrs could add the required_css_class more than once ( #37463 ). Added compatibility for oracledb 26.0.0+ ( #37411 ). Fixed a c ...
https://man.mtool.work/django/6.1/releases/6.1.3.html
GeoDjango フォーム API 7974
GeoDjango フォーム API GeoDjango はジオローカライズされたデータを地図上に視覚的に表示・編集するために、いくつかの特殊なフォームフィールドとウィジェットを提供します。デフォルトでは、 NASA が提供する WMS レイヤーをベースとした OpenLayers を利 ... jango.contrib.gis import forms class MyGeoForm ( forms . Form ): point = forms . PointField ( widget = forms . OSMWidget ( attrs = { "display_raw" : True })) Widget クラス BaseGeometryWidget class BaseGeometryWidget [ソース] これは、サブクラスが必要と ...
https://man.mtool.work/django/6.1/ref/contrib/gis/forms-api.html
PREV 1 2 NEXT