<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                低層 API 暴露的功能對理解一些實現細節、調試目的或高級?[*擴展*](http://docs.jinkan.org/docs/jinja2/extensions.html#jinja-extensions)?技巧是有用的。除非你準確地了解你在做什么,否則 不推薦使用這些 API 。 Environment.lex(*source*,?*name=None*,?*filename=None*)[](http://docs.jinkan.org/docs/jinja2/api.html#jinja2.Environment.lex "Permalink to this definition") Lex the given sourcecode and return a generator that yields tokens as tuples in the form?(lineno,?token_type,?value). This can be useful for?[*extension development*](http://docs.jinkan.org/docs/jinja2/extensions.html#writing-extensions)?and debugging templates. This does not perform preprocessing. If you want the preprocessing of the extensions to be applied you have to filter source through the?[preprocess()](http://docs.jinkan.org/docs/jinja2/api.html#jinja2.Environment.preprocess "jinja2.Environment.preprocess")?method. Environment.parse(*source*,?*name=None*,?*filename=None*)[](http://docs.jinkan.org/docs/jinja2/api.html#jinja2.Environment.parse "Permalink to this definition") Parse the sourcecode and return the abstract syntax tree. This tree of nodes is used by the compiler to convert the template into executable source- or bytecode. This is useful for debugging or to extract information from templates. If you are?[*developing Jinja2 extensions*](http://docs.jinkan.org/docs/jinja2/extensions.html#writing-extensions)?this gives you a good overview of the node tree generated. Environment.preprocess(*source*,?*name=None*,?*filename=None*)[](http://docs.jinkan.org/docs/jinja2/api.html#jinja2.Environment.preprocess "Permalink to this definition") Preprocesses the source with all extensions. This is automatically called for all parsing and compiling methods but?*not*?for?[lex()](http://docs.jinkan.org/docs/jinja2/api.html#jinja2.Environment.lex "jinja2.Environment.lex")?because there you usually only want the actual source tokenized. Template.new_context(*vars=None*,?*shared=False*,?*locals=None*)[](http://docs.jinkan.org/docs/jinja2/api.html#jinja2.Template.new_context "Permalink to this definition") Create a new?Context?for this template. The vars provided will be passed to the template. Per default the globals are added to the context. If shared is set to?True?the data is passed as it to the context without adding the globals. locals?can be a dict of local variables for internal usage. Template.root_render_func(*context*)[](http://docs.jinkan.org/docs/jinja2/api.html#jinja2.Template.root_render_func "Permalink to this definition") 這是低層的渲染函數。它接受一個必須由相同模板或兼容的模板的?[new_context()](http://docs.jinkan.org/docs/jinja2/api.html#jinja2.Template.new_context "jinja2.Template.new_context")?創建的?Context?。這個渲染函數由編譯器從 模板代碼產生,并返回一個生產 unicode 字符串的生成器。 如果模板代碼中發生了異常,模板引擎不會重寫異常而是直接傳遞原始的異常。 事實上,這個函數只在?[render()](http://docs.jinkan.org/docs/jinja2/api.html#jinja2.Template.render "jinja2.Template.render")?/?[generate()](http://docs.jinkan.org/docs/jinja2/api.html#jinja2.Template.generate "jinja2.Template.generate")?/?[stream()](http://docs.jinkan.org/docs/jinja2/api.html#jinja2.Template.stream "jinja2.Template.stream")?的調用里被調用。 Template.blocks[](http://docs.jinkan.org/docs/jinja2/api.html#jinja2.Template.blocks "Permalink to this definition") 一個塊渲染函數的字典。其中的每個函數與?[root_render_func()](http://docs.jinkan.org/docs/jinja2/api.html#jinja2.Template.root_render_func "jinja2.Template.root_render_func")?的工作 相同,并且有相同的限制。 Template.is_up_to_date[](http://docs.jinkan.org/docs/jinja2/api.html#jinja2.Template.is_up_to_date "Permalink to this definition") 如果有可用的新版本模板,這個屬性是?False?,否則是?True?。 注意 低層 API 是易碎的。未來的 Jinja2 的版本將不會試圖以不向后兼容的方式修改它, 而是在 Jinja2 核心的修改中表現出來。比如如果 Jinja2 在之后的版本中引入一 個新的 AST 節點,它會由?[parse()](http://docs.jinkan.org/docs/jinja2/api.html#jinja2.Environment.parse "jinja2.Environment.parse")?返回。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看