Ejemplo n.º 1
0
 def top_html(filters, is_admin):
     tops = Gift.top_desc(filters, is_admin)
     if tops:
         tops = tops.filter('rating >=', 0).run(limit=48)
     return render_to_response('gift/top_sales.html', {
         'gifts': tops,
         'active_category': 'top'
     })
Ejemplo n.º 2
0
 def top_ajax_mem(filters_, last_gift_, is_admin):
     gifts_ = Gift.top_desc(filters_, is_admin)
     if gifts_:
         gifts_ = gifts_.run(limit=DEFAULT_REQUEST_COUNT, offset=last_gift_)
     return gifts_