-2
Warum sehe ich diesen Fehler? Gibt es ein Problem in der django
Methode unten?DeprecationWarning: Erstellen von Streaming-Antworten mit `HttpResponse` ist veraltet. Verwenden Sie `StreamingHttpResponse`?
def email_send(request):
data = json.loads(request.body)
email_conf = getEmailConf(data)
mail_message = getFormattedMsg(data)
try:
t = threading.Thread(target=send_mail,args=[email_conf['subject'],mail_message , email_conf['from_addr'],[email_conf['to_addr'],]],kwargs={'fail_silently':False})
t.setDaemon(True)
t.start()
except:
print "Exception in sending Mail:"
print data
print email_conf
response= email_conf['response']
try:
if data['id']==8:
response={'redirect2thankupage'}
except:
pass
return HttpResponse(response)