(1)下载库: pip install emoji
(2)导入库 + (3)使用:
import emoji
@csrf_exempt
def register(request):
"""用户授权一键注册并登录"""
nickname = request.POST.get('nickname')
nickname = emoji.demojize(nickname)
(1)下载库: pip install emoji
(2)导入库 + (3)使用:
import emoji
@csrf_exempt
def register(request):
"""用户授权一键注册并登录"""
nickname = request.POST.get('nickname')
nickname = emoji.demojize(nickname)