code: def undelete(request, message_id, success_url=None):
      
      user = request.user
      message = get_object_or_404(Message, id=message_id)
      undeleted = False
      if success_url is None:
          success_url = reverse('messages_inbox')
      if 'next' in request.GET:
          success_url = request.GET['next']
      if message.sender == user:
          message.sender_deleted_at = None
          undeleted = True
      if message.recipient == user:
          message.recipient_deleted_at = None
          undeleted = True
      if undeleted:
          message.save()
          messages.info(request, _(u"Message successfully recovered."))
          if notification:
              notification.send([user], "messages_recovered", {'message': message,})
          return HttpResponseRedirect(success_url)
      raise Http404
docs: Recovers a message from trash. This is achieved by removing the
      ``(sender|recipient)_deleted_at`` from the model.