Exemple #1
0
def done_transload(request):
    request_id = request.REQUEST['request_id']
    irequest = InstanceRequest.objects.get(id=request_id)
    if irequest.user != request.user:
        return redirect("/")

    gtfs_file = GtfsFile(instance_request=irequest, transload_url=request.REQUEST['transload_url'])
    gtfs_file.save()

    return redirect("/upload?request_id=%s" % request_id)
Exemple #2
0
def done_transload(request):
    request_id = request.REQUEST['request_id']
    irequest = InstanceRequest.objects.get(id=request_id)
    if irequest.user != request.user:
        return redirect("/")

    gtfs_file = GtfsFile(instance_request=irequest,
                         transload_url=request.REQUEST['transload_url'])
    gtfs_file.save()

    return redirect("/upload?request_id=%s" % request_id)
Exemple #3
0
def done_upload(request):
    #get the instance request id out of the key
    key = request.REQUEST['key']
    _1, request_id, _2 = key.split("/")
    irequest = InstanceRequest.objects.get(id=request_id)
    if irequest.user != request.user:
        return redirect("/")

    gtfs_file = GtfsFile(instance_request=irequest, s3_key=key)
    gtfs_file.save()

    return redirect("/upload?request_id=%s" % irequest.id)
Exemple #4
0
def done_upload(request):
    #get the instance request id out of the key
    key = request.REQUEST['key']
    _1, request_id, _2 = key.split("/")
    irequest = InstanceRequest.objects.get(id=request_id)
    if irequest.user != request.user:
        return redirect("/")

    gtfs_file = GtfsFile(instance_request=irequest, s3_key=key)
    gtfs_file.save()

    return redirect("/upload?request_id=%s" % irequest.id)