我如何在懒惰的翻译中添加换行符?我搜索了django,也搜索了Google,但没有找到任何信息。在
我有我的懒惰翻译与多行以下,但换行/换行渲染到屏幕上。在
messages.success(
request,
_("If the e-mail address has been registered, you'll receive an e-mail with instructions."
"/n/n"
"If you don't receive this e-mail, check your spam e-mail folder or contact us for assistance."))
我也尝试过<;b r/>;,和反斜杠n,但它们不会在django模板屏幕上呈现为新行。在
您应该使用反斜杠
\n
作为换行符。在注意,
\n
符号是常规的空白,在HTML页面上它看起来像是简单的空格。如果要显示多行消息,则应使用<br />
标记并使消息“安全”:相关问题 更多 >
编程相关推荐