我有:
...
post_str = "Please input the following information... \nDescription: \n Last Name:"
context = {
'post_str':post_str,
...
}
return render_to_response('contact/contact.html', context, context_instance=RequestContext(request))它是这样打印的,
Please input the following information... Description: Last Name:。
但我想把它打印出来:
Please input the following information...
Description:
Last Name:我以为我用对了。如何让换行符成功地生成我需要的内容?
提前感谢您的帮助。
发布于 2012-09-26 02:52:37
换行符在HTML中不做任何事情。请改用<br />。
https://stackoverflow.com/questions/12589094
复制相似问题