diff --git a/backend/Dockerfile b/backend/Dockerfile index 1b44c28..68ea085 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -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 diff --git a/backend/system/views/user.py b/backend/system/views/user.py index 280cd6e..5935a10 100644 --- a/backend/system/views/user.py +++ b/backend/system/views/user.py @@ -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