@api_view(['GET'])
def go_to(request, key, format=None):
    url = storage.get(key)
    if (not url):
        return JsonResponse(status=404, data={'error': 'key not found'})
    return HttpResponseRedirect(redirect_to=url.address)
@api_view(['GET'])
def go_to(request, key, format=None):
    url = storage.get(key)
    if (not url):
        return JsonResponse(status=404, data={'error': 'key not found'})
    return HttpResponseRedirect(redirect_to=url.address)