per page, with , order by , clip by
Results of 1 - 10 of about 64 for render (0.007 sec.)
クラスベースのジェネリックビュー: フラットインデックス 14430
クラスベースのジェネリックビュー: フラットインデックス この索引は、クラスベースビューのリファレンス文書を、異なる観点から編成したものです。ビューごとに、クラスツリーの有効な属性とメソッドが表されます。動作を定義するクラスの観点から編集された ... mplateView class TemplateView 属性 (とオプションのアクセサ): content_type extra_context http_method_names response_class [ render_to_response() ] template_engine template_name [ get_template_names() ] メソッド as_view() dispatch() get() get_context_dat ... a() head() http_method_not_allowed() render_to_response() setup() RedirectView class RedirectView 属性 (とオプションのアクセサ): http_method_names pattern_name perman ... name() ] extra_context http_method_names model pk_url_kwarg query_pk_and_slug queryset [ get_queryset() ] response_class [ render_to_response() ] slug_field [ get_slug_field() ] slug_url_kwarg template_engine template_name [ get_template_names() ] temp ...
https://man.mtool.work/django/6.1/ref/class-based-views/flattened-index.html
独自のテンプレートタグとフィルタを作る 13296
独自のテンプレートタグとフィルタを作る Django のテンプレート言語は、アプリケーションのプレゼンテーションロジックのニーズに対応するように設計された、多種多様な 埋め込みタグやフィルタ を搭載しています。それでもなお、テンプレート構成要素のコア ... simple_tag を提供しています。 この関数は django.template.Library のメソッドで、任意の数の引数を受け取る関数を取り、それを render 関数と上記で説明した他の必要なビットにラップし、そしてテンプレートシステムに登録します。 私たちの current_time 関数は、以下 ... he 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 helper function to accomplish this. ... o simple_tag() , this function accepts a custom tag function, but with the additional content argument, which contains the rendered content as defined inside the tag. This allows dynamic template sections to be easily incorporated into custom tags. たと ...
https://man.mtool.work/django/6.1/howto/custom-template-tags.html
TemplateResponse および SimpleTemplateResponse 10008
TemplateResponse および SimpleTemplateResponse 標準の HttpResponse オブジェクトは静的な構造体です。構築時にあらかじめレンダリングされたコンテンツのブロックが提供され、そのコンテンツは変更可能ですが、簡単に変更できる形ではありません。 しかし ... オブジェクト class SimpleTemplateResponse [ソース] 属性 SimpleTemplateResponse. template_name The name of the template to be rendered. Accepts a backend-dependent template object (such as those returned by get_template() ), the name of a template, or a l ... ンダリングするときに使用するコンテキストデータ。 これは dict でなければなりません。 例: {'foo': 123} SimpleTemplateResponse. rendered_content [ソース] 現在のテンプレートとコンテキストデータを使ってレンダリングされた、レスポンスコンテンツの現在の値。 Simp ... leTemplateResponse. is_rendered [ソース] レスポンスの内容がレンダリングされたかどうかを示す真偽値。 メソッド SimpleTemplateResponse. __init__ ( template ...
https://man.mtool.work/django/6.1/ref/template-response.html
クラスベースのビューでミックスイン (mixin) を使用する 9792
クラスベースのビューでミックスイン (mixin) を使用する 注意 This is an advanced topic. A working knowledge of Django's class-based views is advised before exploring these techniques. Django のビルトインのクラスベースビューではたくさんの機能が ... に一貫性を保ちやすくなっています。 TemplateResponseMixin Every built in view which returns a TemplateResponse will call the render_to_response() method that TemplateResponseMixin provides. Most of the time this will be called for you (for instance, it i ... ew ); similarly, it's unlikely that you'll need to override it, although if you want your response to return something not rendered via a Django template then you'll want to do it. For an example of this, see the JSONResponseMixin example . render_to_r ... フォルトを提供するためにこれをオーバーライドします。 ContextMixin Every built in view which needs context data, such as for rendering a template (including TemplateResponseMixin above), should call get_context_data() passing any data they want to ensure ...
https://man.mtool.work/django/6.1/topics/class-based-views/mixins.html
Django 1.3 リリースノート 8227
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 ... contrib.staticfiles -- to help developers handle the static media files (images, CSS, JavaScript, etc.) that are needed to render a complete web page. In previous versions of Django, it was common to place static assets in MEDIA_ROOT along with user-up ... ts a takes_context argument, making it easier to write simple template tags that require access to template context. A new render() shortcut -- an alternative to django.shortcuts.render_to_response() providing a RequestContext by default. Support for c ... custom management command that can be run manually or scheduled to run periodically via e.g. cron). PasswordInput default rendering behavior The PasswordInput form widget, intended for use with form fields which represent passwords, accepts a boolean ...
https://man.mtool.work/django/6.1/releases/1.3.html
はじめての Django アプリ作成、その 3 8083
はじめての Django アプリ作成、その 3 このチュートリアルは チュートリアルその 2 の続きです。ここでは、引続き Web 投票アプリケーションの開発を例にして、公開用のインタフェース、ビュー(view) の作成を焦点に解説します。 困ったときは: このチュート ... mplate ( "polls/index.html" ) context = { "latest_question_list" : latest_question_list } return HttpResponse ( template . render ( context , request )) このコードは、 polls/index.html というテンプレートをロードし、そこにコンテキストを渡します。コンテキ ... チュートリアルその2 で作った "What's up" という質問が入っていますね)。リンクは質問の詳細ページを指します。 ショートカット: render() テンプレートをロードしてコンテキストに値を入れ、テンプレートをレンダリングした結果を HttpResponse オブジェクトで返す、と ... のショートカットを提供します。これを使って index() ビューを書き換えてみましょう: polls/views.py from django.shortcuts import render from .models import Question def index ( request ): latest_question_list = Question . objects . order_by ( "-pub_date" )[: ...
https://man.mtool.work/django/6.1/intro/tutorial03.html
テンプレート 8083
テンプレート Django はウェブフレームワークなので、HTML を動的に生成する便利な手段が必要でした。最も一般的なアプローチは、テンプレートに頼ることです。テンプレートには、出力したい HTML を書いた静的な部分と、動的なコンテンツを挿入する方法を書い ... 組み込みフィルタのリファレンス 、 独自のテンプレートフィルタの書き方 Comments コメントはこのように書きます: {# this won't be rendered #} {% comment %} タグで複数行のコメントを書けます。 コンポーネント このセクションについて このセクションで紹介するのは、 ... te.Context はコンテキストデータの他にいくつかのメタデータを保持します。これはテンプレートをレンダリングするために Template.render() に渡されます。 django.template.RequestContext は Context のサブクラスで、現在の HttpRequest を保存し、テンプレートコンテ ... ラーを含んでいる場合に発生します。 get_template() と select_template() が返す Template オブジェクトは以下のシグネチャを持つ render() メソッドを提供しなければなりません: Template. render ( context = None , request = None ) 与えられたコンテキストを用いて、 ...
https://man.mtool.work/django/6.1/topics/templates.html
Python プログラマーのための Django テンプレート言語 8012
Python プログラマーのための Django テンプレート言語 この文書は Django テンプレートシステムがどのように動作し、どのように拡張するか、技術的な観点から説明します。構文に関するリファレンスを探しているなら、 Django テンプレート言語 を参照してくだ ... .template.Template をラップした django.template.backends.django.Template を返します。 前のステップで取得した Template には render() メソッドがあり、コンテキストと場合によってはリクエストを Context に集約し、その下にある Template にレンダリングを委譲しま ... aware な出力 を参照してください。 使用例については、下記の Context オブジェクトを使って遊ぶ を参照してください。 Template. render ( context ) [ソース] Context を指定して Template オブジェクトの render() メソッドを呼び出します: >>> from django.template ... te >>> template = Template ( "My name is {{ my_name }}." ) >>> context = Context ({ "my_name" : "Adrian" }) >>> template . render ( context ) "My name is Adrian." >>> context = Context ({ "my_name" : "Dolores" }) >>> template . render ( context ) "My n ...
https://man.mtool.work/django/6.1/ref/templates/api.html
Django 1.8 リリースノート 7940
Django 1.8 リリースノート April 1, 2015 Django 1.8 へようこそ! このリリースノートでは、 バージョン 1.8 の新機能 と、Django 1.7 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した機能 ... integrating template backends. It includes built-in support for the Django template language and for Jinja2 . It supports rendering templates with multiple engines within the same project. Learn more about the new features in the topic guide and check ... the storage. See the deprecation note about adding this argument to your custom storage classes. フォーム Form widgets now render attributes with a value of True or False as HTML5 boolean attributes. The new has_error() method allows checking if a spec ... _class is defined on a form, then the <label> tags for required fields will have this class present in its attributes. The rendering of non-field errors in unordered lists ( <ul> ) now includes nonfield in its list of classes to distinguish them from f ...
https://man.mtool.work/django/6.1/releases/1.8.html
Django のショートカット関数 7940
Django のショートカット関数 django.shortcuts パッケージは、MVC の複数のレベルにまたがるヘルパー関数とクラスを集めたものです。言い換えれば、これらの関数やクラスは、便宜上、控えめな結合を取り入れます。 render() render ( request , template_nam ... ction which returns a TemplateResponse because the constructor of TemplateResponse offers the same level of convenience as render() . 必須の引数 request このレスポンスを生成するのに使用されるリクエスト オブジェクト。 template_name 使用するテンプレートの ... は、テンプレート myapp/index.html をMIMEタイプ application/xhtml+xml でレンダリングしてみます。 from django.shortcuts import render def my_view ( request ): # View code here... return render ( request , "myapp/index.html" , { "foo" : "bar" , }, content_t ... st ): # View code here... t = loader . get_template ( "myapp/index.html" ) c = { "foo" : "bar" } return HttpResponse ( t . render ( c , request ), content_type = "application/xhtml+xml" ) redirect() redirect ( to , * args , permanent = False , preserve ...
https://man.mtool.work/django/6.1/topics/http/shortcuts.html
PREV 1 2 3 4 5 6 7 NEXT