per page, with , order by , clip by
Results of 1 - 10 of about 12 for TemplateSyntaxError (0.015 sec.)
テンプレートのバックエンドをカスタマイズする — Django 6.1 ドキュメント 11974
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » テンプレートのバックエンドをカスタマイズする ¶ カスタムのバックエンド ¶ ここでは、他のテンプレートシステムを使用するために、カスタムテンプレートバッ ... 装する必要があります。以下は架空の foobar テンプレートライブラリの例です: from django.template import TemplateDoesNotExist , TemplateSyntaxError from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy , csrf_tok ... return Template ( self . engine . from_string ( template_code )) except foobar . TemplateCompilationFailed as exc : raise TemplateSyntaxError ( exc . args ) def get_template ( self , template_name ): try : return Template ( self . engine . get_template ( template_ ... exc : raise TemplateDoesNotExist ( exc . args , backend = self ) except foobar . TemplateCompilationFailed as exc : raise TemplateSyntaxError ( exc . args ) class Template : def __init__ ( self , template ): self . template = template def render ( self , context = ...
https://man.mtool.work/django/6.1/howto/custom-template-backend.html
独自のテンプレートタグとフィルタを作る — Django 6.1 ドキュメント 11284
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 独自のテンプレートタグとフィルタを作る ¶ Django のテンプレート言語は、アプリケーションのプレゼンテーションロジックのニーズに対応するように設計された ... ows not to split quoted strings. tag_name , format_string = token . split_contents () except ValueError : raise template . TemplateSyntaxError ( " %r tag requires a single argument" % token . contents . split ()[ 0 ] ) if not ( format_string [ 0 ] == format_string ... [ - 1 ] and format_string [ 0 ] in ( '"' , "'" )): raise template . TemplateSyntaxError ( " %r tag's argument should be in quotes" % tag_name ) return CurrentTimeNode ( format_string [ 1 : - 1 ]) メモ: parser は ... 堅牢ではありません。常に token.split_contents() を使用することをお勧めします。 この関数は構文エラーに対して django.template.TemplateSyntaxError を親切なメッセージとともに発生させます。 The TemplateSyntaxError exceptions use the tag_name variable. Don't hardcode the ...
https://man.mtool.work/django/6.1/howto/custom-template-tags.html
独自のテンプレートタグとフィルタを作る — Django 6.1 ドキュメント 11284
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 独自のテンプレートタグとフィルタを作る ¶ Django のテンプレート言語は、アプリケーションのプレゼンテーションロジックのニーズに対応するように設計された ... ows not to split quoted strings. tag_name , format_string = token . split_contents () except ValueError : raise template . TemplateSyntaxError ( " %r tag requires a single argument" % token . contents . split ()[ 0 ] ) if not ( format_string [ 0 ] == format_string ... [ - 1 ] and format_string [ 0 ] in ( '"' , "'" )): raise template . TemplateSyntaxError ( " %r tag's argument should be in quotes" % tag_name ) return CurrentTimeNode ( format_string [ 1 : - 1 ]) メモ: parser は ... 堅牢ではありません。常に token.split_contents() を使用することをお勧めします。 この関数は構文エラーに対して django.template.TemplateSyntaxError を親切なメッセージとともに発生させます。 The TemplateSyntaxError exceptions use the tag_name variable. Don't hardcode the ...
https://man.mtool.work/django/6.1/howto/custom-template-tags.html
テンプレートのバックエンドをカスタマイズする — Django 6.1 ドキュメント 10577
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » テンプレートのバックエンドをカスタマイズする ¶ カスタムのバックエンド ¶ ここでは、他のテンプレートシステムを使用するために、カスタムテンプレートバッ ... 装する必要があります。以下は架空の foobar テンプレートライブラリの例です: from django.template import TemplateDoesNotExist , TemplateSyntaxError from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy , csrf_tok ... return Template ( self . engine . from_string ( template_code )) except foobar . TemplateCompilationFailed as exc : raise TemplateSyntaxError ( exc . args ) def get_template ( self , template_name ): try : return Template ( self . engine . get_template ( template_ ... exc : raise TemplateDoesNotExist ( exc . args , backend = self ) except foobar . TemplateCompilationFailed as exc : raise TemplateSyntaxError ( exc . args ) class Template : def __init__ ( self , template ): self . template = template def render ( self , context = ...
https://man.mtool.work/django/6.1/howto/custom-template-backend.html
テンプレート — Django 6.1 ドキュメント 8012
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » テンプレート ¶ Django はウェブフレームワークなので、HTML を動的に生成する便利な手段が必要でした。最も一般的なアプローチは、テンプレートに頼ることです ... 。テンプレートが見つからない場合、 TemplateDoesNotExist を発生します。テンプレートが見つかったが無効な構文を含んでいる場合、 TemplateSyntaxError を発生します。 テンプレートがどのように検索され読み込まれるかは、各エンジンのバックエンドと設定によって異なります。 検索を ... す。これは get_template() のような、与えられたテンプレートを複数のエンジンから読み込もうとする関数で使用されます。 exception TemplateSyntaxError ( msg ) [ソース] ¶ この例外は、テンプレートが見つかったが、エラーを含んでいる場合に発生します。 get_template() と select_t ...
https://man.mtool.work/django/6.1/topics/templates.html
テンプレート — Django 6.1 ドキュメント 8012
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » テンプレート ¶ Django はウェブフレームワークなので、HTML を動的に生成する便利な手段が必要でした。最も一般的なアプローチは、テンプレートに頼ることです ... 。テンプレートが見つからない場合、 TemplateDoesNotExist を発生します。テンプレートが見つかったが無効な構文を含んでいる場合、 TemplateSyntaxError を発生します。 テンプレートがどのように検索され読み込まれるかは、各エンジンのバックエンドと設定によって異なります。 検索を ... す。これは get_template() のような、与えられたテンプレートを複数のエンジンから読み込もうとする関数で使用されます。 exception TemplateSyntaxError ( msg ) [ソース] ¶ この例外は、テンプレートが見つかったが、エラーを含んでいる場合に発生します。 get_template() と select_t ...
https://man.mtool.work/django/6.1/topics/templates.html
Django 1.4 リリースノート — Django 6.1 ドキュメント 7782
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django 1.4 リリースノート ¶ March 23, 2012 Django 1.4 へようこそ! These release notes cover the new features , as well as some backwards incompatibl ... g was True , any exception raised during template rendering (even exceptions unrelated to template syntax) were wrapped in TemplateSyntaxError and re-raised. This was done in order to provide detailed template source location information in the debug 500 page. In D ... m template rendering is now consistent regardless of the value of TEMPLATE_DEBUG , and there's no need to catch and unwrap TemplateSyntaxError in order to catch other errors. truncatechars template filter ¶ This new filter truncates a string to be no longer than th ...
https://man.mtool.work/django/6.1/releases/1.4.html
Django 1.4 リリースノート — Django 6.1 ドキュメント 7782
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django 1.4 リリースノート ¶ March 23, 2012 Django 1.4 へようこそ! These release notes cover the new features , as well as some backwards incompatibl ... g was True , any exception raised during template rendering (even exceptions unrelated to template syntax) were wrapped in TemplateSyntaxError and re-raised. This was done in order to provide detailed template source location information in the debug 500 page. In D ... m template rendering is now consistent regardless of the value of TEMPLATE_DEBUG , and there's no need to catch and unwrap TemplateSyntaxError in order to catch other errors. truncatechars template filter ¶ This new filter truncates a string to be no longer than th ...
https://man.mtool.work/django/6.1/releases/1.4.html
Python プログラマーのための Django テンプレート言語 — Django 6.1 ドキュメント 7322
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Python プログラマーのための Django テンプレート言語 ¶ この文書は Django テンプレートシステムがどのように動作し、どのように拡張するか、技術的な観点か ... } が最初に現れるかどうかを調べます。これは "%}" が文字列リテラルとして使われるのを阻止します。たとえば、以下のような式では TemplateSyntaxError が発生します: {% include "template.html" tvar = "Some string literal with %} in it." %} {% with tvar = "Some string litera ...
https://man.mtool.work/django/6.1/ref/templates/api.html
Django 1.2 リリースノート — Django 6.1 ドキュメント 7322
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django 1.2 リリースノート ¶ 2010 年 5 月 17 日 Django 1.2 へようこそ! Nearly a year in the making, Django 1.2 packs an impressive list of new featur ... ble names. Now, the keyword status is always enforced, and template code such as {% if not %} or {% if and %} will throw a TemplateSyntaxError . Also, in is a new keyword and so is not a valid variable name in this tag. LazyObject ¶ LazyObject is an undocumented-bu ...
https://man.mtool.work/django/6.1/releases/1.2.html
PREV 1 2 NEXT