

def get_link_templates(self, request):
    uri = request.build_absolute_uri
    templates = {
        'self': reverse_tmpl(uri, 'serrano:category', {
            'pk': (int, 'id'),
        }),
        'parent': reverse_tmpl(uri, 'serrano:category', {
            'pk': (int, 'parent_id'),
        }),
    }
    return templates

dataset/ETHPy150Open chop-dbhi/serrano/serrano/resources/category.py CategoryBase.get_link_templates/original