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' })
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_