python - 找到 django/contrib/admin/templates

标签 python django ubuntu django-templates

我无法查看 django/contrib/admin/templates 文件夹。它似乎隐藏在/usr/lib/python2.7/dist-packages/文件夹中,ctrl+h 无济于事(似乎所有 django 文件都被隐藏了)。 终端中的“locate django/contrib/admin/templates”显示了一堆文件,但我如何在 GUI 中查看这些文件?我使用 Ubuntu 12.10 提前致谢

最佳答案

要查看您的 django 安装所在的位置,请在命令行运行:

python -c "
import sys
sys.path = sys.path[1:]
import django
print(django.__path__)"

在我的系统上,这会返回

['/usr/local/lib/python2.7/site-packages/django']

来源:Django Docs

关于python - 找到 django/contrib/admin/templates,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14931793/

相关文章:

angular - 启动 Angular + ASP.Net Core 应用程序导致 'The SPA default page middleware could not return the default page '/index.html''

java - 如何检测何时在触摸设备上显示键盘?

python - 使用 to_excel() 将数据帧列表写入 Excel

python - 我应该如何编写很长的代码行?

python - 为什么我画图遇到除零错误?

python - django - 如何将表的记录与来自另一个表的计算计数值绑定(bind)

java - android客户端无法收到python服务器的响应

Django 3.1+ : (fields. E180) SQLite 不支持 JSONFields

django - 将uuid传递给reverse()来构造url

python - 如何在 VSCode 中运行 python3 代码?/bin/sh : 1: python: not found