def get(self, request):
    sponsor_data = Sponsor.objects.order_by('level')
    level_dict = {}
    for sponsor in sponsor_data:
        if (sponsor.level_en_name not in level_dict):
            level_dict[sponsor.level_en_name] = []
        level_dict[sponsor.level_en_name].append({'name': sponsor.name, 'subtitle_en_us': sponsor.subtitle_en_us, 'subtitle_zh_hant': sponsor.subtitle_zh_hant, 'intro_en_us': sponsor.intro_en_us, 'intro_zh_hant': sponsor.intro_zh_hant, 'website_url': sponsor.website_url, 'logo_url': (sponsor.logo.url if sponsor.logo else '')})
    response_data = {'data': []}
    for (level_name, sponsors) in level_dict.items():
        response_data['data'].append({'level_name': level_name, 'sponsors': sponsors})
    return Response(response_data)
def get(self, request):
    sponsor_data = Sponsor.objects.order_by('level')
    level_dict = {}
    for sponsor in sponsor_data:
        if (sponsor.level_en_name not in level_dict):
            level_dict[sponsor.level_en_name] = []
        level_dict[sponsor.level_en_name].append({'name': sponsor.name, 'subtitle_en_us': sponsor.subtitle_en_us, 'subtitle_zh_hant': sponsor.subtitle_zh_hant, 'intro_en_us': sponsor.intro_en_us, 'intro_zh_hant': sponsor.intro_zh_hant, 'website_url': sponsor.website_url, 'logo_url': (sponsor.logo.url if sponsor.logo else )})
    response_data = {'data': []}
    for (level_name, sponsors) in level_dict.items():
        response_data['data'].append({'level_name': level_name, 'sponsors': sponsors})
    return Response(response_data)