(self)
return self.first()
Return exactly one result or raise an exception.
Return exactly one result or raise an exception.
Return exactly one result or raise an exception .
def one(self):
        """
        Return exactly one result or raise an exception.
        """
        length = len(self)
        if length > 1:
            raise MultipleResultsFound("%s results found." % length)

        return self.first()
def one ( self ) : length = len ( self ) if length > 1 : raise MultipleResultsFound ( "%s results found." % length ) return self . first ( )