python - 检索纯字段标签

标签 python google-app-engine python-2.7 wtforms

是否可以检索纯字段标签。

当我使用类似 {{ form.field.label }} 的内容时,它包含 html 标签 元素。 我只是想在某些地方使用疼痛标签。

最佳答案

我没有在这里测试的工具,但我认为您可能正在搜索的是:

{{ form.field.label.text }}

参见the relevant section from the documentation :

field_id The ID of the field which this label will reference.
text The original label text passed to the field’s constructor.

关于python - 检索纯字段标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15426784/

相关文章:

python - 根据 pearsonr 值 : 更改每个 PairGrid Seaborn 图中的字体颜色

python - Azure 认为身份验证 key 是 1024 位,但事实并非如此

google-app-engine - 为什么 os.Getenv ("SERVER_SOFTWARE") 为我返回空白字符串?

google-app-engine - 去包冲突

python - 如何优雅地中止 App Engine 管道?

python - 如何打印字典中的所有键/值对

python - 如何加载旧的 pickle 文件?

python - virtualenvwrapper 'binds' 究竟如何到项目目录

python - Django Admin 不显示预先存在的对象

python - 使用 Airflow 将数据从 Postgres/MySQL 移动到 S3