Exemple #1
0
 def partition(self):
     grouper = (
         lambda p: 'physical' if p.is_shipping_required() else 'digital')
     return partition(self.lines.all(), grouper, ProductGroup)
Exemple #2
0
 def partition(self):
     return partition(
         self, lambda p: 'physical' if p.is_shipping_required() else 'digital',
         ProductGroup)
Exemple #3
0
 def partition(self):
     """Split the card into a list of groups for shipping."""
     grouper = (lambda p: 'physical'
                if p.is_shipping_required() else 'digital')
     return partition(self.lines.all(), grouper, ProductGroup)
Exemple #4
0
 def partition(self):
     grouper = (lambda p: 'physical'
                if p.is_shipping_required() else 'digital')
     return partition(self.lines.all(), grouper, ProductGroup)
Exemple #5
0
 def partition(self):
     return partition(
         self, lambda p: 'physical'
         if p.is_shipping_required() else 'digital', ProductGroup)