@dajaxice_register
def search_heroes(request, search_request):
    if len(search_request) < 2:
        return None
    dajax = Dajax()
    result_set = Heroes.objects.filter(dota2_name__icontains=search_request)[:25]
    result_string = render_to_string('ajax/search_results_hero.html', dictionary=dict({'results': result_set}))    
    dajax.add_data(result_string, 'render_heroes')
    return dajax.json()
dataset/ETHPy150Open romanalexander/opendota/dotastats/ajax.py/search_heroes/original