per page, with , order by , clip by
Results of 1 - 10 of about 36 for Comment (0.005 sec.)
チケットをトリアージする 11189
チケットをトリアージする Django uses Trac for managing the work on the code base. Trac is a community-tended garden of the bugs people have found and the features Django has decided to add. As in any garden, sometimes there are weeds to be ... the pull request, marks the ticket as "Accepted", sets the flags "needs tests" and "patch needs improvement", and leaves a comment explaining how Alice can improve the patch. This puts the ticket automatically into the "waiting on author" queue within t ... eeds PR review" queue. Charlie reviews the pull request, sets the "patch needs improvement" flag again, and leaves another comment suggesting changes to the implementation. The ticket moves back to the "waiting on author" queue. Alice updates the pull r ... "Needs tests" and "Needs documentation" are self-explanatory. "Patch needs improvement" will generally be accompanied by a comment on the ticket explaining what is needed to improve the code. Ready For Checkin The ticket was reviewed by any member of th ...
https://man.mtool.work/django/6.1/internals/contributing/triaging-tickets.html
PostgreSQL 固有の集計関数 10999
PostgreSQL 固有の集計関数 これらの機能は、 django.contrib.postgres.aggregates モジュールから利用可能です。これらについての詳細は、 PostgreSQLドキュメント に記載されています。 注釈 すべての関数はデフォルトのエイリアスを持たないので、明示的に ... の場合は True を、すべての値が null または値が存在しない場合は default を、それ以外の場合は False を返します。 使用例: class Comment ( models . Model ): body = models . TextField () published = models . BooleanField () rank = models . IntegerField () >>> ... from django.db.models import Q >>> from django.contrib.postgres.aggregates import BoolAnd >>> Comment . objects . aggregate ( booland = BoolAnd ( "published" )) {'booland': False} >>> Comment . objects . aggregate ( booland ... rue の場合は True を、すべての値が null または値がない場合は default を、そうでない場合は False を返します。 使用例: class Comment ( models . Model ): body = models . TextField () published = models . BooleanField () rank = models . IntegerField () >>> ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/aggregates.html
ウィジェット 10999
ウィジェット ウィジェットは、Django が HTML の input 要素の表現方法です。ウィジェットは、HTML のレンダリングをコントロールして、ウィジェットに合致する GET/POST ディクショナリからデータを取り出します。 Built-in widgets によって作られる HTML ... ルドに別のウィジェットを使用したい場合は、フィールド定義で widget 引数を使用できます。例えば: from django import forms class CommentForm ( forms . Form ): name = forms . CharField () url = forms . URLField () comment = forms . CharField ( widget = forms . ... Textarea ) これは、comment のフォームに対して、デフォルトの TextInput ウィジェットではなく、より大きなサイズの Textarea ウィジェットを指定しています。 ... S ファイルにいくつか記述を追加する必要もあります)。 たとえば、以下のフォームを取り上げます: from django import forms class CommentForm ( forms . Form ): name = forms . CharField () url = forms . URLField () comment = forms . CharField () このフォームには ...
https://man.mtool.work/django/6.1/ref/forms/widgets.html
Django 4.2 リリースノート 10793
Django 4.2 リリースノート 2023年4月3日 Django 4.2 へようこそ! このリリースノートでは、 バージョン 4.2 の新機能 と、Django 4.1 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。また、 一部の機能を非推奨 とし ... 。結果として、 psycopg2 との違いを考慮した変更が必要になるかもしれません。 カラムとテーブルにおけるコメント 新しい Field.db_comment と Meta.db_table_comment オプションは、それぞれカラムとテーブルにコメントを作成できるようにします。例えば: from django.db ... import models class Question ( models . Model ): text = models . TextField ( db_comment = "Poll question" ) pub_date = models . DateTimeField ( db_comment = "Date and time when the question was published" , ) c ... lass Meta : db_table_comment = "Poll questions" class Answer ( models . Model ): question = models . ForeignKey ( Question , on_delete = models . CASCA ...
https://man.mtool.work/django/6.1/releases/4.2.html
SchemaEditor 10602
SchemaEditor class BaseDatabaseSchemaEditor [ソース] Django のマイグレーションシステムは2つの部分に分かれています。データベースに対してどのような操作を実行するべきかを計算してその結果を保管するロジックの部分 ( django.db.migrations )と、「モ ... , old_db_table , new_db_table ) [ソース] モデルのテーブル名を old_db_table から new_db_table に変更します。 alter_db_table_comment() BaseDatabaseSchemaEditor. alter_db_table_comment ( model , old_db_table_comment , new_db_table_comment ) [ソース] model ... のテーブルコメントを new_db_table_comment に変更します。 alter_db_tablespace() BaseDatabaseSchemaEditor. alter_db_tablespace ( model , old_db_tablespace , new_db_ta ...
https://man.mtool.work/django/6.1/ref/schema-editor.html
独自のテンプレートタグとフィルタを作る 10206
独自のテンプレートタグとフィルタを作る Django のテンプレート言語は、アプリケーションのプレゼンテーションロジックのニーズに対応するように設計された、多種多様な 埋め込みタグやフィルタ を搭載しています。それでもなお、テンプレート構成要素のコア ... True ): return linebreaksbr ( urlize ( text , autoescape = autoescape ), autoescape = autoescape ) 次のように使います: {{ comment | urlize_and_linebreaks }} これは以下と同等です: {{ comment | urlize | linebreaksbr }} フィルタとタイムゾーン datetime オブ ... に代入することをサポートしています。 他のブロックタグまでパースする テンプレートタグは連動して動作します。例えば、標準の {% comment %} タグは {% endcomment %} まですべてを隠蔽します。このようなテンプレートタグを作成するには、コンパイル関数の中で parser.p ... arse() を使います。 以下は {% comment %} タグをシンプル化したものです: def do_comment ( parser , token ): nodelist = parser . parse (( "endcomment" ,)) parser . ...
https://man.mtool.work/django/6.1/howto/custom-template-tags.html
フォーム フィールド 9810
フォーム フィールド class Field [ソース] Form クラスを作成時の一番重要な部分は、form のフィールド (field) の定義です。各フィールドにはカスタムの検証ロジックがあり、他にいくつかのフックもあります。 Field. clean ( value ) [ソース] Field クラス ... 装する Form の完全な例です。出力を簡略化するために、 auto_id=False を指定しています: >>> from django import forms >>> class CommentForm ( forms . Form ): ... name = forms . CharField ( label = "Your name" ) ... url = forms . URLField ( label = "Your webs ... ite" , required = False ) ... comment = forms . CharField () ... >>> f = CommentForm ( auto_id = False ) >>> print ( f ) <div>Your name:<input type="text" name= ... "name" required></div> <div>Your website:<input type="url" name="url"></div> <div>Comment:<input type="text" name="comment" required></div> label_suffix Field. label_suffix label_suffix 引数を使用すると、フォーム ...
https://man.mtool.work/django/6.1/ref/forms/fields.html
クエリ式 (Query Expression) 9620
クエリ式 (Query Expression) クエリ式 (query expression) は、update、create、filter、order by、annotation、またはaggregateの一部として使用できる値または計算を記述します。式が真偽値を出力する場合、フィルタで直接使用できます。クエリの記述に使用 ... メールアドレスをアノテーションとして付けることができます: >>> from django.db.models import OuterRef , Subquery >>> newest = Comment . objects . filter ( post = OuterRef ( "pk" )) . order_by ( "-created_at" ) >>> Post . objects . annotate ( newest_comment ... values ( "email" )[: 1 ])) PostgreSQLの場合、SQLは以下のようになります: SELECT "post" . "id" , ( SELECT U0 . "email" FROM "comment" U0 WHERE U0 . "post_id" = ( "post" . "id" ) ORDER BY U0 . "created_at" DESC LIMIT 1 ) AS "newest_commenter_email" FROM "p ... o = timezone . now () - timedelta ( days = 1 ) >>> posts = Post . objects . filter ( published_at__gte = one_day_ago ) >>> Comment . objects . filter ( post__in = Subquery ( posts . values ( "pk" ))) この場合、サブクエリは values() を使って単一のカラム、 ...
https://man.mtool.work/django/6.1/ref/models/expressions.html
Django テンプレート言語 9033
Django テンプレート言語 このドキュメントはDjangoテンプレートシステムの文法を説明しています。もしあなたがもっと技術者的な観点でどう動かすかやどう拡張するかを知りたい場合は、 Python プログラマーのための Django テンプレート言語 を参照してくださ ... にしか使えません(改行は {# と #} の間に入れてはいけません)。テンプレートの複数行の部分をコメントアウトする必要がある場合は comment タグを参照してください。 テンプレートの継承 Django のテンプレートエンジンの中で最もパワフルな -- ゆえに最も複雑な -- 部分が ... ORM は外部キーに関係するオブジェクトの集合を見つけるために "entry_set" という構文を提供しています。これによって、たとえば "comment" と呼ばれるモデルが外部キーで "task" というモデルに関連づけられている場合、テンプレートは task モデルに添えられたすべての ... comment に対して、以下のようにアクセスできます。 {% for comment in task.comment_set.all %} {{ comment }} {% endfor %} 同じように、 QuerySet は、そこに含まれているオブジェクトの個数を数え ...
https://man.mtool.work/django/6.1/ref/templates/language.html
Django 1.4 リリースノート 8637
Django 1.4 リリースノート March 23, 2012 Django 1.4 へようこそ! These release notes cover the new features , as well as some backwards incompatible changes you'll want to be aware of when upgrading from Django 1.3 or older versions. We've a ... fill in a form generated by the pre-upgrade Django instance and try to submit it to the upgraded Django instance: contrib.comments form security hash Consequences: The user will see the validation error "Security hash failed." Time period: The amount o ... f time you expect users to take filling out comment forms. FormWizard security hash Consequences: The user will see an error about the form having expired and will be sent ba ... backend. Concurrency behavior is defined by the underlying backend implementation. Check their documentation for details. COMMENTS_BANNED_USERS_GROUP setting Django's comments has historically supported excluding the comments of a special user group, b ...
https://man.mtool.work/django/6.1/releases/1.4.html
PREV 1 2 3 4 NEXT