'Get the revision that came before this in the document\'s history.'

@property
def previous(self):

    older_revs = Revision.objects.filter(document=self.document, id__lt=self.id, is_approved=True)
    older_revs = older_revs.order_by('-created')
    try:
        return older_revs[0]
    except IndexError:
        return None
