符号|鉴于Flask教程 [英] Symbol | in view for Flask tutorial

查看:139
本文介绍了符号|鉴于Flask教程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为Flask框架做一个教程,在,但是对于这个特定的例子,这不是它们如何使用。


I'm doing a tutorial for the Flask framework at http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-iii-web-forms In this very chapter I've found a piece of code that I didn't understand. It is:

|{% for pr in providers %}
<a href="javascript:set_openid('{{pr.url}}', '{{pr.name}}');">{{pr.name}}</a> |
{% endfor %}

Why do we need the symbol | there?

解决方案

This pipe is simply adding the | between providers, as seen in the screenshot. Notice the symbol between "Google" and "Yahoo"

Pipes are used in filters, but for this specific example, that is not how they are used.

这篇关于符号|鉴于Flask教程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆