You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何修改Django Admin中「添加」「修改」等按钮的跳转URL

location = /app {
return 302 https://$server_name/app/index.html;

}

location ~ ^/app/(.)$ {
include app_frontend;
rewrite ^/app/(.
) /$1 break;
proxy_pass http://unix:/opt/data/app/app.sock;
}
...

## 解决方案
无需修改Admin模板,仅需在Django项目的`settings.py`文件中添加以下配置项:
```python
FORCE_SCRIPT_NAME = '/app/'

内容的提问来源于stack exchange,提问作者Evgeniia

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.29 15:42:41