fix: location_info
This commit is contained in:
@@ -16,7 +16,7 @@ COPY . .
|
|||||||
RUN pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple
|
RUN pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple
|
||||||
# 入口命令由 docker-compose 控制
|
# 入口命令由 docker-compose 控制
|
||||||
# 数据库迁移
|
# 数据库迁移
|
||||||
RUN python manage.py migrate
|
#RUN python manage.py migrate
|
||||||
# 收集静态文件
|
# 收集静态文件
|
||||||
RUN python manage.py collectstatic --noinput
|
RUN python manage.py collectstatic --noinput
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ class UserLogin(ObtainAuthToken):
|
|||||||
client_ip = get_client_ip(request)
|
client_ip = get_client_ip(request)
|
||||||
|
|
||||||
# 获取IP地址的地理位置信息
|
# 获取IP地址的地理位置信息
|
||||||
location_info = self.get_location_from_ip(client_ip)
|
# location_info = self.get_location_from_ip(client_ip)
|
||||||
|
location_info = ''
|
||||||
|
|
||||||
# 更新登录IP和登录时间
|
# 更新登录IP和登录时间
|
||||||
user.login_ip = client_ip
|
user.login_ip = client_ip
|
||||||
|
|||||||
Reference in New Issue
Block a user