views:

83

answers:

2

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!

+4  A: 

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

class EmailAlternativesMessage(EmailMessage):
  multipart_subtype = 'alternative'
  ...
kibitzer
You are an absolute live saver! That has worked a treat! Why has it worked? I think I need to do my homework ;-)
Shaun
Glad that it did, but you must know that it is a quickfix, hard to do better without proper code inspection. There are many other mail multipart types, which you should use depending on what you are sending - you can read more about possible options at http://en.wikipedia.org/wiki/MIME#Multipart_messages
kibitzer
+2  A: 

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.

Carl Meyer