Subversion Repositories SmartDukaan

Rev

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

Rev 22261 Rev 22262
Line 924... Line 924...
924
    else:
924
    else:
925
        print "Getting user deals from cache"
925
        print "Getting user deals from cache"
926
    category_specific_deals = user_specific_deals.get(category_id)
926
    category_specific_deals = user_specific_deals.get(category_id)
927
    #filter categores on basis of source and tags
927
    #filter categores on basis of source and tags
928
    if source=="online":
928
    if source=="online":
929
        category_specific_deals = filter(lambda x: x['source_id'] in ONLINE_DEAL_SOURCE_MAP, category_specific_deals)
929
        category_specific_deals = filter(lambda x: x['source_id'] in ONLINE_DEAL_SOURCE_MAP.keys(), category_specific_deals)
-
 
930
    #For saholic specific deals
930
    elif source=="deals":
931
    elif source=="deals":
931
        category_specific_deals = filter(lambda x: x['source_id'] == SOURCE_MAP.get("SAHOLIC"), category_specific_deals)
932
        category_specific_deals = filter(lambda x: x['source_id'] == 4, category_specific_deals)        
932
        
-
 
933
         
933
         
934
    
934
    
935
    insert_featured_deals = False
935
    insert_featured_deals = False
936
    if sort is None or direction is None:
936
    if sort is None or direction is None:
937
        insert_featured_deals = True
937
        insert_featured_deals = True
Line 1179... Line 1179...
1179
        print "Getting user deals from accessory cache"
1179
        print "Getting user deals from accessory cache"
1180
    category_specific_deals = user_specific_deals.get(category_id)
1180
    category_specific_deals = user_specific_deals.get(category_id)
1181
    
1181
    
1182
    #filter categores on basis of source and tags
1182
    #filter categores on basis of source and tags
1183
    if source=="online":
1183
    if source=="online":
1184
        category_specific_deals = filter(lambda x: x['source_id'] in ONLINE_DEAL_SOURCE_MAP, category_specific_deals)
1184
        category_specific_deals = filter(lambda x: x['source_id'] in ONLINE_DEAL_SOURCE_MAP.keys(), category_specific_deals)
-
 
1185
    #For saholic specific deals
1185
    elif source=="deals":
1186
    elif source=="deals":
1186
        category_specific_deals = filter(lambda x: x['source_id'] == SOURCE_MAP.get("SAHOLIC"), category_specific_deals)
1187
        category_specific_deals = filter(lambda x: x['source_id'] == 4, category_specific_deals)
1187
    
1188
    
1188
    insert_featured_deals = False
1189
    insert_featured_deals = False
1189
    if sort is None or direction is None:
1190
    if sort is None or direction is None:
1190
        insert_featured_deals = True
1191
        insert_featured_deals = True
1191
        rankMap = user_specific_deals.get(str(category_id)+"_rankMap")
1192
        rankMap = user_specific_deals.get(str(category_id)+"_rankMap")