The route calls for the variable username to be defined, but you're passing a variable called nickname in your post.html template.flask.url_for('user', nickname=post.author.nickname)需要更改为:flask.url_for('user', username=post.author.nickname) 这篇关于BuildError:无法使用值['nickname']为端点'user'构建url.您是否忘记了指定值['page','username']?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-26 22:38