コード例 #1
0
ファイル: views.py プロジェクト: MiaoS/OTPSetup
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)
コード例 #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)
コード例 #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)
コード例 #4
0
ファイル: views.py プロジェクト: MiaoS/OTPSetup
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)