Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是新来 的,我只是想在文本字段中为flask-wtforms中的文本区域字段赋值,我只应该使用value="blah blah" 关于文本区域的任何内容?
value="blah blah"
此示例来自文档
def edit_article(request): article = Article.get(...) form = MyForm(request.POST, article)
可以改写为
def edit_article(request): article = Article.get(...) data = request.POST or {} data.setdefault('fieldname','default value') form = MyForm(data, article)