per page, with , order by , clip by
Results of 1 - 10 of about 34 for document (0.005 sec.)
admin アプリケーションの JavaScript カスタマイズ 14699
admin アプリケーションの JavaScript カスタマイズ インラインフォームイベント インラインフォームが admin アプリケーション変更フォームに追加または削除された際に JavaScript を実行したい場合、 formset:added と formset:removed イベントを使用できま ... :added イベントでは、 event.target は新しく追加された行です。 カスタムの change_form.html テンプレートで admin_change_form_document_ready ブロックを拡張し、イベントリスナーのコードを追加します: {% extends 'admin/change_form.html' %} {% load static %} {% ... block admin_change_form_document_ready %} {{ block .super }} < script src = " {% static 'app/formset_handlers.js' %} " ></ script > {% endblock %} app/stat ... ic/app/formset_handlers.js document . addEventListener ( 'formset:added' , ( event ) => { if ( event . detail . formsetName == 'author_set' ) { // Do somethin ...
https://man.mtool.work/django/6.1/ref/contrib/admin/javascript.html
Django 4.2 リリースノート 11136
Django 4.2 リリースノート 2023年4月3日 Django 4.2 へようこそ! このリリースノートでは、 バージョン 4.2 の新機能 と、Django 4.1 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。また、 一部の機能を非推奨 とし ... には非エンコード形式を渡すよう指摘する警告が発せられます。 JSONエンコードされた文字列リテラルを渡すために使われていたコード: Document . objects . bulk_create ( Document ( data = Value ( "null" )), Document ( data = Value ( "[]" )), Document ( data = Value ... ( '"foo-bar"' )), ) Document . objects . annotate ( JSONBAgg ( "field" , default = Value ( "[]" )), ) これは以下のようにすべきです: Document . objects ... . bulk_create ( Document ( data = Value ( None , JSONField ())), Document ( data = []), Document ( data = "foo-bar" ), ) Document . objects . annot ...
https://man.mtool.work/django/6.1/releases/4.2.html
Django 1.3 リリースノート 10976
Django 1.3 リリースノート March 23, 2011 Django 1.3 へようこそ! Nearly a year in the making, Django 1.3 includes quite a few new features and plenty of bug fixes and improvements to existing features. These release notes cover the new featu ... e the final Django release series to do so; beginning with Django 1.4, the minimum supported Python version will be 2.5. A document outlining our full timeline for deprecating Python 2.x and moving to Python 3.x will be published shortly after the releas ... etely generic view base class that can be used as the basis for reusable applications that can be easily extended. See the documentation on class-based generic views for more details. There is also a document to help you convert your function-based gener ... as well -- most notably, the error emails sent on an HTTP 500 server error are now handled as a logging activity. See the documentation on Django's logging interface for more details. Extended static files handling Django 1.3 ships with a new contrib ap ...
https://man.mtool.work/django/6.1/releases/1.3.html
Django の CSRF 保護を利用する 9027
Django の CSRF 保護を利用する CSRF 対策をあなたのビューで有効にするには、以下の手順に従ってください: The CSRF middleware is activated by default in the MIDDLEWARE setting. If you override that setting, remember that 'django.middleware.csrf. ... 変更することができます。 以下のようにしてトークンを取得できます: function getCookie ( name ) { let cookieValue = null ; if ( document . cookie && document . cookie !== '' ) { const cookies = document . cookie . split ( ';' ); for ( let i = 0 ; i < cookies ... CSRF トークンを含め、JavaScript で DOM からトークンを読み取る必要があります: {% csrf_token %} < script > const csrftoken = document . querySelector ( '[name=csrfmiddlewaretoken]' ). value ; </ script > AJAX 通信でトークンを設定する 最後に、AJAXリクエスト ...
https://man.mtool.work/django/6.1/howto/csrf.html
組み込みのビュー 9027
組み込みのビュー Django の組み込みビューのいくつかは、 ビューを記述する や他のドキュメントで説明されています。 開発中のファイルの配信 static. serve ( request , path , document_root , show_indexes = False ) プロジェクトの静的アセット以外にも ... rest of your URLconf goes here ... if settings . DEBUG : urlpatterns += [ re_path ( r "^media/(?P<path>.*)$" , serve , { "document_root" : settings . MEDIA_ROOT , }, ), ] このコードは MEDIA_URL の値が 'media/' であると仮定しています。これは serve() ビュ ... ーを呼び出して、 URLconf からのパスと、必須の document_root パラメータを渡します。 この URL パターンを定義するのは少し面倒なので、 Django には小さな URL ヘルパー関数 static() が ...
https://man.mtool.work/django/6.1/ref/views.html
Django 1.8.15 リリースノート 9027
Django 1.8.15 リリースノート September 26, 2016 Django 1.8.15 fixes a security issue in 1.8.14. CSRF protection bypass on a site with Google Analytics An interaction between Google Analytics and Django's cookie parsing could allow an attack ... te this attack. request.COOKIES may now contain cookies that are invalid according to RFC 6265 but are possible to set via document.cookie . ...
https://man.mtool.work/django/6.1/releases/1.8.15.html
Django 1.9.10 リリースノート 8867
Django 1.9.10 リリースノート September 26, 2016 Django 1.9.10 では、1.9.9 にあった1つのセキュリティの問題を修正しました。 CSRF protection bypass on a site with Google Analytics An interaction between Google Analytics and Django's cookie par ... te this attack. request.COOKIES may now contain cookies that are invalid according to RFC 6265 but are possible to set via document.cookie . ...
https://man.mtool.work/django/6.1/releases/1.9.10.html
Django 0.95 リリースノート 8707
Django 0.95 リリースノート Django 0.95 へようこそ! このリリースでは、2006年1月にリリースされた 0.91 から Django の開発が大幅に進んでいます。このリリースのすべての変更点を詳細に書くことはできませんが、以下にその要点を列挙します。 適合性 (sui ... ry of the distribution. You may have a need to use some of the features that are marked as "subject to API change" in that document, but that's OK with us as long as it's OK with you, and as long as you understand APIs may change in the future. Fortunate ... other main theme of this release is a dramatic increase in usability. We've made countless improvements in error messages, documentation, etc., to improve developers' quality of life. The new features and changes introduced in 0.95 include: Django now us ... ce when undertaking the porting operation. Problem reports and getting help Need help resolving a problem with Django? The documentation in the distribution is also available online at the Django website . The FAQ document is especially recommended, as i ...
https://man.mtool.work/django/6.1/releases/0.95.html
翻訳 8707
翻訳 概要 Django プロジェクトを翻訳可能にするためには、Python コードやテンプレートに、多少のフックを加筆しなければなりません。このフックは 翻訳文字列 と呼ばれます。翻訳文字列は Django に「このテキストに対する翻訳が有効な場合、このテキストは ... ettext npgettext pluralidx gettext gettext 関数は、Python コード内の標準の gettext インターフェースと同じように動作します: document . write ( gettext ( "this is to be translated" )) ngettext ngettext 関数は単語やフレーズを複数形にするインターフェースを提 ... _format get_format 関数は設定済みの i18n 表示形式設定にアクセスでき、与えられた設定名に対して表示形式文字列を取り出します: document . write ( get_format ( 'DATE_FORMAT' )); // 'N j, Y' 以下の設定に対してアクセスします: DATE_FORMAT DATE_INPUT_FORMATS DATE ... 保守するために役立ちます。 gettext_noop これは gettext 関数をエミュレートしますが、何もせず、渡されたものをそのまま返します: document . write ( gettext_noop ( "this will not be translated" )) これは、将来的に翻訳が必要なコードの部分をもみ消しておくのに役立 ...
https://man.mtool.work/django/6.1/topics/i18n/translation.html
静的ファイル (画像、JavaScript、CSS など) を管理する 7892
静的ファイル (画像、JavaScript、CSS など) を管理する Websites generally need to serve additional files such as images, JavaScript, or CSS. In Django, we refer to these files as "static files". Django provides django.contrib.staticfiles to h ... rls.static import static urlpatterns = [ # ... the rest of your URLconf goes here ... ] + static ( settings . STATIC_URL , document_root = settings . STATIC_ROOT ) 注釈 このヘルパー関数はデバッグモードでのみ動作し、与えられた接頭辞が URL ( http://static. ... urls.static import static urlpatterns = [ # ... the rest of your URLconf goes here ... ] + static ( settings . MEDIA_URL , document_root = settings . MEDIA_ROOT ) 注釈 このヘルパー関数はデバッグモードでのみ動作し、与えられたプレフィックスがURL ( http://m ...
https://man.mtool.work/django/6.1/howto/static-files/
PREV 1 2 3 4 NEXT