Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x 使用TextChoices模型中的html代码显示笑脸_Python 3.x_Django_Model - Fatal编程技术网

Python 3.x 使用TextChoices模型中的html代码显示笑脸

Python 3.x 使用TextChoices模型中的html代码显示笑脸,python-3.x,django,model,Python 3.x,Django,Model,我希望你很好 我已经为我的用户配置文件创建了一个文本选择模型。如果显示数据{user.userprofile.smiley},我得到了代码🍆

我希望你很好

我已经为我的用户配置文件创建了一个
文本选择模型
。如果显示数据{user.userprofile.smiley},我得到了代码
🍆
{{ user.userprofile.smiley|safe }}
如果对恶意用户提供的数据使用此筛选器,则可能会受到XSS攻击,因此请小心