per page, with , order by , clip by
Results of 1 - 10 of about 38 for block (0.003 sec.)
Django テンプレート言語 15613
Django テンプレート言語 このドキュメントはDjangoテンプレートシステムの文法を説明しています。もしあなたがもっと技術者的な観点でどう動かすかやどう拡張するかを知りたい場合は、 Python プログラマーのための Django テンプレート言語 を参照してくださ ... の基本を示した最小限のテンプレートです。各要素については、この文書の後半で説明します。 {% extends "base_generic.html" %} {% block title %}{{ section.title }}{% endblock %} {% block content %} < h1 > {{ section.title }} </ h1 > {% for story in story_lis ... } " > {{ story.headline | upper }} </ a > </ h2 > < p > {{ story.tease | truncatewords :"100" }} </ p > {% endfor %} {% endblock %} 設計思想 なぜ、(ZopeのTALのような) XMLベースのテンプレートではなく、テキストベースのテンプレートを使うのか?それは、Djan ... ィルタは文字列を返すので、フィルタを使った数学的な比較は通常は期待通りにならないことに注意してください。 length は例外です。 block と extends テンプレートの "定型文" を削減する強力な方法である template inheritance (下記参照)を設定します。 繰り返します ...
https://man.mtool.work/django/6.1/ref/templates/language.html
Coding style 11352
Coding style Please follow these coding standards when writing code for inclusion in Django. Pre-commit checks pre-commit is a framework for managing pre-commit hooks. These hooks help to identify simple issues before committing code for re ... w rules in Django template code. {% extends %} should be the first non-comment line. Do this: {% extends "base.html" %} {% block content %} < h1 class = "font-semibold text-xl" > {{ pages.title }} </ h1 > {% endblock content %} Or this: {# This is a c ... omment #} {% extends "base.html" %} {% block content %} < h1 class = "font-semibold text-xl" > {{ pages.title }} </ h1 > {% endblock content %} Don't do this: {% load ... i18n %} {% extends "base.html" %} {% block content %} < h1 class = "font-semibold text-xl" > {{ pages.title }} </ h1 > {% endblock content %} Put exactly one space b ...
https://man.mtool.work/django/6.1/internals/contributing/writing-code/coding-sty...
admin アプリケーションの JavaScript カスタマイズ 9434
admin アプリケーションの JavaScript カスタマイズ インラインフォームイベント インラインフォームが admin アプリケーション変更フォームに追加または削除された際に JavaScript を実行したい場合、 formset:added と formset:removed イベントを使用できま ... _ready ブロックを拡張し、イベントリスナーのコードを追加します: {% extends 'admin/change_form.html' %} {% load static %} {% block admin_change_form_document_ready %} {{ block .super }} < script src = " {% static 'app/formset_handlers.js' %} " ></ scrip ... t > {% endblock %} app/static/app/formset_handlers.js document . addEventListener ( 'formset:added' , ( event ) => { if ( event . detail . ... ge_form_document_ready ブロックには、変更フォーム内でのさまざまな操作を処理するための JavaScript コードが含まれており、 {{ block.super }} は、それらもレンダリングする必要があるために追加されています。 バージョン4.1より前のDjangoをサポートする もしイベ ...
https://man.mtool.work/django/6.1/ref/contrib/admin/javascript.html
独自のテンプレートタグとフィルタを作る 9214
独自のテンプレートタグとフィルタを作る Django のテンプレート言語は、アプリケーションのプレゼンテーションロジックのニーズに対応するように設計された、多種多様な 埋め込みタグやフィルタ を搭載しています。それでもなお、テンプレート構成要素のコア ... I:%M %p" as the_time %} < p > The time is {{ the_time }} . </ p > シンプル・ブロック・タグ django.template.Library. simple_block_tag () When a section of rendered template needs to be passed into a custom tag, Django provides the simple_block_tag help ... ます: from django import template from myapp.charts import render_chart register = template . Library () @register . simple_block_tag def chart ( content ): return render_chart ( source = content ) content 引数には、 {% chart %} と {% endchart %} タグの ... me} (たとえば endchart )で閉じます。この閉じタグの名前は、 end_name パラメータでカスタマイズできます: @register . simple_block_tag ( end_name = "endofchart" ) def chart ( content ): return render_chart ( source = content ) この場合、テンプレートの定 ...
https://man.mtool.work/django/6.1/howto/custom-template-tags.html
テンプレートをオーバーライドする 9214
テンプレートをオーバーライドする プロジェクトでは、 django.contrib.admin のような contrib アプリケーションやサードパーティアプリケーションで Djangoアプリケーションのテンプレートを上書きすることができます。 テンプレートの上書きは、プロジェク ... site.html テンプレートにカスタムロゴを追加できます: templates/admin/base_site.html {% extends "admin/base_site.html" %} {% block branding %} < img src = "link/to/logo.png" alt = "logo" > {{ block .super }} {% endblock %} 備考: この例では、 templates/a ... れはオーバーライドされるテンプレートと同じです。 このテンプレートは branding ブロックだけを置き換え、カスタムロゴを追加し、 block.super を使って以前のコンテンツを保持します。 残りのテンプレートは admin/base_site.html からそのまま継承されます。 このテク ... するときに、すでにロードされているオーバーライドテンプレート ( templates/admin/base_site.html ) を考慮しないので動作します。 block.super と組み合わせることで、小さなカスタマイズを行うための強力なテクニックとなります。 ...
https://man.mtool.work/django/6.1/howto/overriding-templates.html
ドキュメントを書く 8899
ドキュメントを書く 私たちはドキュメントの一貫性と読みやすさを重要視しています。結局のところ、Django はジャーナリズムの環境で作られました!ですから、私たちはコードを扱うようにドキュメントを扱います。できるだけ頻繁に改善することを目指しています ... します。 Documentation quality checks Several checks help maintain Django's documentation quality, including spelling , code block formatting , and documentation style . These checks are run automatically in CI and must pass before documentation changes ... と確信できる場合のみ、その単語を docs/spelling_wordlist に追加してください(リストはアルファベット順にしてください)。 Code block format check All Python code blocks should be formatted using the blacken-docs auto-formatter. This is automatically run b ... ke black ...\> make.bat black The formatter will report any issues by printing them to the terminal and will reformat code blocks where possible. Documentation lint check Django's documentation is checked for reStructuredText style and formal issues u ...
https://man.mtool.work/django/6.1/internals/contributing/writing-documentation.h...
Django の概要 8365
Django の概要 Django は変転の激しいニュースルーム環境で開発された経緯から、よくある Web 開発タスクを迅速かつ簡単化するように設計されています。ここでは Django による データベースを使った Web アプリケーション開発をざっと見てみましょう。 このド ... たとしましょう。テンプレートは以下のように書かれています: news/templates/news/year_archive.html {% extends "base.html" %} {% block title %} Articles for {{ year }}{% endblock %} {% block content %} < h1 > Articles for {{ year }} </ h1 > {% for article i ... {{ article.reporter.full_name }} </ p > < p > Published {{ article.pub_date | date :"F j, Y" }} </ p > {% endfor %} {% endblock %} 変数は二重の波括弧で囲まれています。 {{ article.headline }} は、「article の headline という属性の出力」を表しています。 ... で、 静的ファイルの配信 を含む例をあげます: templates/base.html {% load static %} < html lang = "en" > < head > < title > {% block title %}{% endblock %} </ title > </ head > < body > < img src = " {% static 'images/sitelogo.png' %} " alt = "Logo" > {% ...
https://man.mtool.work/django/6.1/intro/overview.html
Django 3.2 リリースノート 8144
Django 3.2 リリースノート April 6, 2021 Django 3.2 へようこそ! このリリースノートでは、 バージョン 3.2 の新機能 と、Django 3.1 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。また、 一部の機能を非推奨 とし ... new no_key parameter for QuerySet.select_for_update() , supported on PostgreSQL, allows acquiring weaker locks that don't block the creation of rows that reference locked rows through a foreign key. When() expression now allows using the condition ar ... ーム(Transform)を参照できる for details. The new durable argument for atomic() guarantees that changes made in the atomic block will be committed if the block exits without errors. A nested atomic block marked as durable will raise a RuntimeError . A ... he undocumented django.core.files.locks.lock() function now returns False if the file cannot be locked, instead of raising BlockingIOError . The password reset mechanism now invalidates tokens when the user email is changed. makemessages command no lo ...
https://man.mtool.work/django/6.1/releases/3.2.html
Django admin ドキュメントジェネレータ 8034
Django admin ドキュメントジェネレータ Django の admindocs アプリは、 INSTALLED_APPS にある任意のアプリのモデル、ビュー、テンプレートタグ、 テンプレートフィルタの docstring からドキュメントを取り出し、 Django admin から利用できるようにします ... plate.html` これらはすべて、 :role:`link text <link>` の形式でカスタムリンクテキストをサポートしています。たとえば、 :tag:`block <built_in-block>` のように記述します。 モデルのリファレンス admindocs ページの models セクションでは、ユーザーがアクセス可 ...
https://man.mtool.work/django/6.1/ref/contrib/admin/admindocs.html
Django 6.0.5 release notes 7940
Django 6.0.5 release notes May 5, 2026 Django 6.0.5 fixes three security issues with severity "low" and several bugs in 6.0.4. CVE-2026-5766: Potential denial-of-service vulnerability in ASGI requests via file upload limit bypass ASGI reque ... min/templates/admin/change_list.html template added in Django 6.0 that could be problematic when overriding the pagination block ( #37029 ). Fixed a bug in Django 6.0 where deprecation warnings incorrectly skipped lines from third-party packages prefi ...
https://man.mtool.work/django/6.1/releases/6.0.5.html
PREV 1 2 3 4 NEXT