per page, with , order by , clip by
Results of 1 - 10 of about 17 for parser (0.004 sec.)
独自のテンプレートタグとフィルタを作る 13863
独自のテンプレートタグとフィルタを作る Django のテンプレート言語は、アプリケーションのプレゼンテーションロジックのニーズに対応するように設計された、多種多様な 埋め込みタグやフィルタ を搭載しています。それでもなお、テンプレート構成要素のコア ... パーサは、パラメータを取得して Node オブジェクトを作成する必要があります: from django import template def do_current_time ( parser , token ): try : # split_contents() knows not to split quoted strings. tag_name , format_string = token . split_contents ( ... taxError ( " %r tag's argument should be in quotes" % tag_name ) return CurrentTimeNode ( format_string [ 1 : - 1 ]) メモ: parser はテンプレートパーサーオブジェクトです。この例では不要です。 token.contents はタグの生の内容を表す文字列です。この例では ' ... ルタ登録と同様に、これをデコレータとして使うこともできます。 @register . tag ( name = "current_time" ) def do_current_time ( parser , token ): ... @register . tag def shout ( parser , token ): ... name 引数を省略した場合、上記の2番目の例と同じように、Dja ...
https://man.mtool.work/django/6.1/howto/custom-template-tags.html
カスタム django-admin コマンドの作り方 10931
カスタム django-admin コマンドの作り方 manage.py を用いることで独自のアクションを登録する事ができます。例として、あなたが配布している Django アプリケーションに manage.py アクションを追加したくなったとします。このドキュメントでは、 このチュー ... t Question as Poll class Command ( BaseCommand ): help = "Closes the specified poll for voting" def add_arguments ( self , parser ): parser . add_argument ( "poll_ids" , nargs = "+" , type = int ) def handle ( self , * args , ** options ): for poll_id ... ムオプションは、次のように add_arguments() メソッドで追加できます: class Command ( BaseCommand ): def add_arguments ( self , parser ): # Positional arguments parser . add_argument ( "poll_ids" , nargs = "+" , type = int ) # Named (optional) arguments par ... ommand ): def __init__ ( self , * args , ** kwargs ): super () . __init__ ( * args , ** kwargs ) # ... BaseCommand. create_parser ( prog_name , subcommand , ** kwargs ) [ソース] CommandParser インスタンスを返します。これは ArgumentParser サブクラスで、 ...
https://man.mtool.work/django/6.1/howto/custom-management-commands.html
Django 1.3.6 リリースノート 9793
Django 1.3.6 リリースノート February 19, 2013 Django 1.3.6 fixes four security issues present in previous Django releases in the 1.3 series. This is the sixth bugfix/security release in the Django 1.3 series. Host header poisoning Some part ... restrictive value. This host validation is disabled when DEBUG is True or when running tests. XML deserialization The XML parser in the Python standard library is vulnerable to a number of attacks via external entities and entity expansion. Django use ... s this parser for deserializing XML-formatted database fixtures. The fixture deserializer is not intended for use with untrusted data, b ...
https://man.mtool.work/django/6.1/releases/1.3.6.html
Django 1.4.4 リリースノート 9793
Django 1.4.4 リリースノート February 19, 2013 Django 1.4.4 fixes four security issues present in previous Django releases in the 1.4 series, as well as several other bugs and numerous documentation improvements. This is the fourth bugfix/se ... restrictive value. This host validation is disabled when DEBUG is True or when running tests. XML deserialization The XML parser in the Python standard library is vulnerable to a number of attacks via external entities and entity expansion. Django use ... s this parser for deserializing XML-formatted database fixtures. This deserializer is not intended for use with untrusted data, but in o ...
https://man.mtool.work/django/6.1/releases/1.4.4.html
Django 1.8.15 リリースノート 9466
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 ... er to set arbitrary cookies leading to a bypass of CSRF protection. The parser for request.COOKIES is simplified to better match the behavior of browsers and to mitigate this attack. request.COOKIES ma ...
https://man.mtool.work/django/6.1/releases/1.8.15.html
Django 1.9.10 リリースノート 9293
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 ... sing could allow an attacker to set arbitrary cookies leading to a bypass of CSRF protection. The parser for request.COOKIES is simplified to better match the behavior of browsers and to mitigate this attack. request.COOKIES ma ...
https://man.mtool.work/django/6.1/releases/1.9.10.html
テストに関する高度なトピック 8310
テストに関する高度なトピック RequestFactory(リクエスト ファクトリ) class RequestFactory [ソース] RequestFactory はテストクライアントと同じ API を共有しています。しかし、ブラウザのように動作するのではなく、 RequestFactory は任意のビューの最 ... け付けるようにしてください。 テストランナーでは、追加のコマンドラインオプションを定義することもできます。 add_arguments(cls, parser) クラスメソッドを作成またはオーバーライドし、そのメソッド内で parser.add_argument() を呼び出すときにカスタム引数を追加する ... を参照してください)。 このメソッドは、失敗したテストの数を返す必要があります。 classmethod DiscoverRunner. add_arguments ( parser ) [ソース] Override this class method to add custom arguments accepted by the test management command. See argparse.Argume ... ntParser.add_argument() for details about adding arguments to a parser. DiscoverRunner. setup_test_environment ( ** kwargs ) [ソース ...
https://man.mtool.work/django/6.1/topics/testing/advanced.html
Django 6.1 release notes 7983
Django 6.1 release notes August 5, 2026 Welcome to Django 6.1! 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 6.0 or earlier. We've begun the ... and body during redirects, using 307/308 status codes instead of 302/301. 管理コマンド Management commands now set ArgumentParser 's suggest_on_error argument to True by default on Python 3.14, enabling suggestions for incorrectly typed subcommand name ... lid Base64 strings now raise ValidationError instead of being silently accepted. Request と Response HttpRequest.multipart_parser_class can now be customized to use a different multipart parser class. HttpResponseRedirect (and its subclasses), as well ... ラーレポートの管理 ), you may want to review the updates in the base BrokenLinkEmailsMiddleware class. django.http.multipartparser.MultiPartParser now uses strict Base64 validation when decoding encoded request data. Previously, invalid data could be si ...
https://man.mtool.work/django/6.1/releases/6.1.html
Django 1.8 リリースノート 7828
Django 1.8 リリースノート April 1, 2015 Django 1.8 へようこそ! このリリースノートでは、 バージョン 1.8 の新機能 と、Django 1.7 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した機能 ... unner to add more arguments (à la optparse ). Now to implement the same behavior, you have to create an add_arguments(cls, parser) class method on the test runner and call parser.add_argument to add any custom arguments, as parser is now an argparse.Ar ... gumentParser instance. Model check ensures auto-generated column names are within limits specified by database A field name that's long ...
https://man.mtool.work/django/6.1/releases/1.8.html
Django 5.1 リリースノート 7828
Django 5.1 リリースノート 2024年8月7日 Django 5.1 へようこそ! このリリースノートでは、 バージョン 5.1 の新機能 と、Django 5.0 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。また、 一部の機能を非推奨 とし ... tion_compatible 属性を使用すると、制約の検証時にその式を無視するよう指定することができます。 テンプレート カスタムタグは、 Parser オブジェクトに追加のデータを設定できるようになりました。このデータは Template インスタンス上で利用可能になります。このよう ... うになります。 django.utils.text.Truncator used by truncatechars_html and truncatewords_html template filters now uses html.parser.HTMLParser subclasses. This results in a more robust and faster operation, but there may be small differences in the outpu ...
https://man.mtool.work/django/6.1/releases/5.1.html
PREV 1 2 NEXT