def get_price(self, currency=None, orderitem=None):
        """
        This method is part of the public, required API of products. It returns
        either a price instance or raises a ``DoesNotExist`` exception.

        If you need more complex pricing schemes, override this method with
        your own implementation.
        """
        if currency is None:
            currency = (
                orderitem.currency if orderitem else
                plata.shop_instance().default_currency())

        try:
            # Let's hope that ordering=[-id] from the base price definition
            # makes any sense here :-)
            return self.prices.filter(currency=currency)[0]
        except __HOLE__:
            raise self.prices.model.DoesNotExist
dataset/ETHPy150Open matthiask/plata/plata/product/models.py/ProductBase.get_price