有没有办法在eclipse中使用pydev快速找到特定模块的views.py文件?

发布于 2024-12-29 03:56:52 字数 293 浏览 1 评论 0原文

我正在使用 pydev 和 eclipse,同时开发一个包含大约 30 个模块的 django 项目。我通常使用 CTRL+SHIFT+R 在 eclipse 中打开文件。但是当我寻找一个views.py文件并输入“views”时,我得到了30个文件,它们都被命名为views.py。模块名称显示在文件名后面,但有 30 个文件,我仍然需要一段时间才能找到正确的文件。当我也输入模块名称时,所有文件都会消失。

所以我的问题是:有没有一种方法可以使用 pydev 快速访问 eclipse 中特定模块的views.py 文件(或 models.py 文件)?

I'm using pydev and eclipse, while working on a django project that has about 30 modules. I usually use CTRL+SHIFT+R to open a file in eclipse. But when I'm looking for a views.py file and type in 'views', I get 30 files which are all named views.py. The module name is shown behind the filename, but with 30 files it still takes me a while to find the right one. When I type in the module name too, all files disappear.

So my question: Is there a way to quickly acces a views.py file (or models.py file for that matter) of a specific module in eclipse, using pydev?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

煮酒 2025-01-05 03:56:52

在 PyDev 的最新版本中,模块也出现在 Ctrl+Shift+T 中。

假设你的views.py位于my_project.my_app.views.py结构中,你可以输入搜索“mmviews”,它应该能够将你指向my_project.my_app中的views.py。

请注意,如果您知道views.py 中的函数,则可以直接键入该函数。

In recent versions of PyDev, modules also appear in Ctrl+Shift+T.

There, say you have the views.py in a structure my_project.my_app.views.py, you could put in your search 'm.m.views' and it should be able to point you to the views.py in the my_project.my_app.

Note that if you know a function inside views.py you can type that function directly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文