Can not use unicode string in django template

ぐ巨炮叔叔 提交于 2019-12-05 18:01:17

You can define into your HTML tag!

<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> 

and then try to o/p the string.

To debug the issue follow following steps:

  1. In your python files, declare the encoding # -*- coding: utf-8 -*-

  2. In your base html <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!