

def external_id_redirects(request, api_name, resource_name, slug, external_id):
    '\n    Fake-redirects /boundary-set/slug/external_id paths to the proper canonical boundary path.\n    '
    if (resource_name != 'boundary-set'):
        raise Http404
    boundary = get_object_or_404(Boundary, set__slug=slug, external_id=external_id)
    canonical_url = reverse('api_dispatch_detail', kwargs={
        'api_name': api_name,
        'resource_name': 'boundary',
        'slug': slug.slug,
    })
    (view, args, kwargs) = resolve(canonical_url)
    return view(request, *args, **kwargs)

dataset/ETHPy150Open newsapps/django-boundaryservice/boundaryservice/views.py external_id_redirects/VarMisuse@70/152 `boundary`->`slug`