def html(filters_, is_admin): gifts = Gift.last_incoming(filters_, is_admin) if gifts: gifts = gifts.run(limit=DEFAULT_REQUEST_COUNT) return render_to_response('gift/last_incoming.html',{ 'gifts': gifts, 'active_category': 'last_incoming' })
def html(last_gift, filters, is_admin): gifts = Gift.last_incoming(filters, is_admin) if not gifts: return render_to_response('empty.html') gifts = gifts.run(limit=DEFAULT_REQUEST_COUNT, offset=last_gift) return render_to_response('gift/list.html', {'gifts': gifts})