Django 已弃用的标签/初学者
高级开发人员(也是我们公司唯一有 Django 经验的人)已经搬走了并离开了我们。此后不久(按照他的指示),我们将一个站点推送到共享服务器上(我们对服务器具有完全控制权),并将 Django 版本更新到最新版本,以便新站点可以正常工作。
从那时起,我们就遇到了使用旧版本构建的其他 Django 项目的问题。
我遇到的主要问题是我们有一个 crontab,它会向客户发送一封电子邮件,概述他们的订单。我已经截取了我遇到的错误的屏幕截图,但说实话,我很难理解它。为了保护无辜者(客户),这些名字已被更改。
http://i-am-a-fish.co.uk/help。 png
我再次上传了屏幕截图 i-am-a-fish.co.uk/help2.png
非常欢迎所有建议!
The senior developer (and the only person experienced with Django in our company) has moved away and left us. Shortly after this (following his instructions) we pushed a site live onto a shared server (we have full control over the server) and updated the version of Django to the latest release for the new site to work.
Since then we have had issues with the other Django project on there which was built using an older version.
The main issue that I have is that we have a crontab that sends an email to the client outlining their orders. I have taken a screen grab of the error that I am getting but if I am honest I am struggling to make any sense of it. The names have been changed to protect the innocent (client).
http://i-am-a-fish.co.uk/help.png
I have uploaded a screen grab again i-am-a-fish.co.uk/help2.png
All suggestions are very welcomed!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
弃用警告不是原因,您可以忽略它(除非您想修复并使用 hashlib)。原因是您的自定义 EmailAlternativesMessage 类未定义 multipart_subtype。尝试找到 EmailAlternativesMessage 的声明并添加
Deprecation warning is not the reason, you can ignore it (unless you want to fix and use hashlib). The reason is multipart_subtype which your custom EmailAlternativesMessage class is not defining. Try to find declaration of EmailAlternativesMessage and add
现在您眼前的问题已经解决,真正的解决方案是使用 virtualenv 来隔离每个项目的与其他站点的依赖关系(包括 Django 本身),因此部署基于最新 Django 的项目不需要立即升级服务器上的所有其他站点。
Now that your immediate problem is fixed, the real solution here is to use virtualenv to isolate each project's dependencies (including Django itself) from the others, so deploying a project based on recent Django doesn't require an immediate upgrade of every other site on the server.