コード例 #1
0
 def create_from_uid(self, uid):
     '''
     Returns new order referenced to given uid: user id or session key
     
     Returns None if uid is not valid.
     '''
     kwargs = resolve_uid(uid)
     if len(kwargs):
         return self.get_query_set().create(**kwargs)
     else:
         return None
コード例 #2
0
 def create_from_uid(self, uid):
     '''
     Returns new order referenced to given uid: user id or session key
     
     Returns None if uid is not valid.
     '''
     kwargs = resolve_uid(uid)
     if len(kwargs):
         return self.get_query_set().create(**kwargs)
     else:
         return None
コード例 #3
0
 def from_uid(self, uid):
     '''
     Utility method, returns QuerySet of order objects 
     referenced to given uid: User id or session key
     
     Returns empty queryset if nothing found
     '''
     kwargs = resolve_uid(uid)
     if len(kwargs):
         return self.get_query_set().filter(**kwargs)
     else:
         return self.get_empty_query_set()
コード例 #4
0
 def from_uid(self, uid):
     '''
     Utility method, returns QuerySet of order objects 
     referenced to given uid: User id or session key
     
     Returns empty queryset if nothing found
     '''
     kwargs = resolve_uid(uid)
     if len(kwargs):
         return self.get_query_set().filter(**kwargs)
     else:
         return self.get_empty_query_set()