Subversion Repositories SmartDukaan

Rev

Rev 14699 | Rev 14735 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14699 Rev 14725
Line 143... Line 143...
143
        self.userId = userId
143
        self.userId = userId
144
        self.subTagId = subTagId
144
        self.subTagId = subTagId
145
        self.closed = False
145
        self.closed = False
146
        self.storeId = storeId
146
        self.storeId = storeId
147
        self.orderSuccessUrl = orderSuccessUrl
147
        self.orderSuccessUrl = orderSuccessUrl
148
        self.createdOn = str(datetime.now())
-
 
149
        if new:
148
        if new:
-
 
149
            self.createdOn = str(datetime.now())
150
            self.createdOnInt = int(time.mktime(datetime.strptime(datetime.now(), "%Y-%m-%d").timetuple()))
150
            self.createdOnInt = int(time.mktime(self.createdOn.timetuple()))
151
            self.requireDetail = False
151
            self.requireDetail = False
-
 
152
        else:
-
 
153
            self.requireDetail = True
152
        
154
        
153
class SubOrder():
155
class SubOrder():
154
    status = None
156
    status = None
155
    productTitle = None
157
    productTitle = None
156
    estimatedDeliveryDate  = None
158
    estimatedDeliveryDate  = None
Line 193... Line 195...
193
        self.category_id = category_id
195
        self.category_id = category_id
194
        self.thresholdPrice = thresholdPrice
196
        self.thresholdPrice = thresholdPrice
195
        self.rank = rank 
197
        self.rank = rank 
196
    
198
    
197
 
199
 
-
 
200
class obj(object):
-
 
201
    def __init__(self, d):
-
 
202
        for a, b in d.items():
-
 
203
            if isinstance(b, (list, tuple)):
-
 
204
                setattr(self, a, [obj(x) if isinstance(x, dict) else x for x in b])
-
 
205
            else:
-
 
206
                setattr(self, a, obj(b) if isinstance(b, dict) else b)
198
207