获取客户端IP地址
if 'HTTP_X_FORWARDED_FOR' in request.META:
ipaddress = request.META['HTTP_X_FORWARDED_FOR']
else:
ipaddress = request.META['REMOTE_ADDR']
LeslieLiang ©著作权
if 'HTTP_X_FORWARDED_FOR' in request.META:
ipaddress = request.META['HTTP_X_FORWARDED_FOR']
else:
ipaddress = request.META['REMOTE_ADDR']
上一篇:Django文件上传
下一篇:Django中ORM之或语句查询
python3 mysql-多表查询
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M