'Returns the last object of a query, returns None if no match is found.'

def last(self):

    qs = (self.reverse() if self.ordered else self.order_by('-pk'))
    try:
        return qs[0]
    except IndexError:
        return None
