from authors.apps.utils.renderers import AppJSONRenderer

import json

from rest_framework.renderers import JSONRenderer

class UserProfileJSONRenderer(AppJSONRenderer):
    name = 'profile'

class UserProfileListRenderer(JSONRenderer):
    """
    Returns profiles of existing users
    """
    charset = 'utf-8'
    
    def render(self, data, media_type=None, renderer_context=None):
        """ present a list of 
        user profiles in json format
        """
        return json.dumps({
            'profiles':data
        })

class ReadStatsJsonRenderer(AppJSONRenderer):
    name = 'read_stats'

[((20, 15, 22, 10), 'json.dumps', 'json.dumps', ({(20, 26, 22, 9): "{'profiles': data}"}, {}), "({'profiles': data})", False, 'import json\n')]