fix: location_info

This commit is contained in:
XIE7654
2025-09-02 17:50:32 +08:00
parent 6aaaf6c0c0
commit b1dd010c7f
2 changed files with 3 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ COPY . .
RUN pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple
# 入口命令由 docker-compose 控制
# 数据库迁移
RUN python manage.py migrate
#RUN python manage.py migrate
# 收集静态文件
RUN python manage.py collectstatic --noinput

View File

@@ -62,7 +62,8 @@ class UserLogin(ObtainAuthToken):
client_ip = get_client_ip(request)
# 获取IP地址的地理位置信息
location_info = self.get_location_from_ip(client_ip)
# location_info = self.get_location_from_ip(client_ip)
location_info = ''
# 更新登录IP和登录时间
user.login_ip = client_ip