dominos/models.py
def get_product_by_name(self, name):
        '''
        Gets a Item from the Menu by name. Note that the name is not
        case-sensitive but must be spelt correctly.

        :param string name: The name of the item.
        :raises StopIteration: Raises exception if no item is found.
        :return: An item object matching the search.
        :rtype: Item
        '''
        return next(i for i in self.items if i.name.lower() == name.lower())
def get_product_by_name(self, name):
        '''
        Gets a Item from the Menu by name. Note that the name is not
        case-sensitive but must be spelt correctly.

        :param string name: The name of the item.
        :raises StopIteration: Raises exception if no item is found.
        :return: An item object matching the search.
        :rtype: Item
        '''
        return next(i for i in self.items if i.name.lower() == name.lower())
def get_product_by_name ( self , name ) : return next ( i for i in self . items if i . name . lower ( ) == name . lower ( ) )
Gets a Item from the Menu by name. Note that the name is not
        case-sensitive but must be spelt correctly.

        :param string name: The name of the item.
        :raises StopIteration: Raises exception if no item is found.
        :return: An item object matching the search.
        :rtype: Item
Gets a Item from the Menu by name . Note that the name is not case - sensitive but must be spelt correctly .