Django 管理预填充字段没有错误“d.Keyup 不是函数”

发布于 2024-10-10 00:47:35 字数 190 浏览 0 评论 0原文

当我将新站点从开发移动到使用乘客 wsgi 的生产服务器时,预填充管理字段停止工作。使用 firebug,我在 prepopulate.min.js 文件中收到错误“d.Keyup 不是函数”。所有管理 js 文件似乎都已正确合并,因此我不知道是什么导致了此问题。

有什么想法吗?

--更新--

问题已解决,见下文。

When I moved my new site from development to my production server, which is using passenger wsgi, the prepopulate admin fields stopped working. Using firebug I get the error "d.Keyup is not a function" in the prepopulate.min.js file. All the admin js files seem to be getting incorporated correctly so I have no idea what is causing this problem.

Any ideas?

--Update--

Problem solved see below.

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

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

发布评论

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

评论(1

枯叶蝶 2024-10-17 00:47:35

好吧,自己解决了,现在也觉得很傻。

当我开始开发时,我使用 django 1.2.3,当我进入生产时,我只是 pip 安装了 django,它安装了 1.2.4 版本。但是,我必须将管理媒体移动到我的公共文件夹中才能使用乘客对其进行服务器处理,并且我在服务器上使用了开发计算机上的 1.2.3 管理媒体以及 django 版本 1.2.4,这显然导致了问题。

基本上确保您使用适合您正在使用的 django 版本的正确管理媒体:P

Okay managed to solve it myself, feel quite silly now too.

When I started development I used django 1.2.3 and when I went to production I just pip installed django which installed version 1.2.4. However I had to move the admin media into my public folder to server it using passenger and I used the 1.2.3 admin media from my development machine with django version 1.2.4 on the server and this apparently caused the problem.

Basically make sure you use the correct admin media for the version of django you are using :P

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