'Restores a logically deleted document by reverting the deleted
boolean to False. Sends pre_save and post_save Django signals to
follow ducktyping best practices.'

def restore(self):

    if (not self.deleted):
        raise Exception('Document    is    not    deleted,    cannot    be    restored.')
    signals.pre_save.send(sender=self.__class__, instance=self)
    Document.deleted_objects.filter(pk=self.pk).update(deleted=False)
    signals.post_save.send(sender=self.__class__, instance=self)
