(self)
return self.exclude(title="").filter(id__gt=ruuid)
Random podcasts

        Excludes podcasts with missing title to guarantee some
        minimum quality of the results
Random podcasts
Random podcasts
def random(self):
        """Random podcasts

        Excludes podcasts with missing title to guarantee some
        minimum quality of the results"""

        # Using PostgreSQL's RANDOM() is very expensive, so we're generating a
        # random uuid and query podcasts with a higher ID
        # This returns podcasts in order of their ID, but the assumption is
        # that usually only one podcast will be required anyway
        import uuid

        ruuid = uuid.uuid1()
        return self.exclude(title="").filter(id__gt=ruuid)
def random ( self ) : # Using PostgreSQL's RANDOM() is very expensive, so we're generating a # random uuid and query podcasts with a higher ID # This returns podcasts in order of their ID, but the assumption is # that usually only one podcast will be required anyway import uuid ruuid = uuid . uuid1 ( ) return self . exclude ( title = "" ) . filter ( id__gt = ruuid )