def final_step_view(req, upload_session): try: saved_layer = upload.final_step(upload_session, req.user) except upload.LayerNotReady: return json_response({'status': 'pending', 'success': True, 'id': req.GET['id'], 'redirect_to': '/upload/final' + "?id=%s" % req.GET['id']}) # this response is different then all of the other views in the # upload as it does not return a response as a json object _json_response = None try: _json_response = json_response( { 'url': saved_layer.get_absolute_url(), 'bbox': saved_layer.bbox_string, 'crs': { 'type': 'name', 'properties': saved_layer.srid }, 'success': True } ) except BaseException: _json_response = json_response( {'url': saved_layer.get_absolute_url(), 'success': True } ) return _json_response
def final_step_view(req, upload_session): try: saved_layer = upload.final_step(upload_session, req.user) except upload.LayerNotReady: return json_response({ 'status': 'pending', 'success': True, 'id': req.GET['id'], 'redirect_to': '/upload/final' + "?id=%s" % req.GET['id'] }) # this response is different then all of the other views in the # upload as it does not return a response as a json object _json_response = None try: _json_response = json_response({ 'url': saved_layer.get_absolute_url(), 'bbox': saved_layer.bbox_string, 'crs': { 'type': 'name', 'properties': saved_layer.srid }, 'success': True }) except BaseException: _json_response = json_response({ 'url': saved_layer.get_absolute_url(), 'success': True }) return _json_response
def final_step_view(req, upload_session): saved_layer = upload.final_step(upload_session, req.user) # this response is different then all of the other views in the # upload as it does not return a response as a json object return json_response({ 'url': saved_layer.get_absolute_url(), 'success': True })
def final_step_view(req, upload_session): saved_layer = upload.final_step(upload_session, req.user) # this response is different then all of the other views in the # upload as it does not return a response as a json object return json_response( {'url': saved_layer.get_absolute_url(), 'success': True } )
def final_step_view(req, upload_session): try: saved_layer = upload.final_step(upload_session, req.user) except upload.LayerNotReady: return json_response({'status': 'pending', 'success': True, 'id': req.GET['id'], 'redirect_to': '/upload/final' + "?id=%s" % req.GET['id']})
def final_step_view(req, upload_session): try: saved_layer = upload.final_step(upload_session, req.user) except upload.LayerNotReady: return json_response({"status": "pending", "success": True, "redirect_to": "/upload/final"}) # this response is different then all of the other views in the # upload as it does not return a response as a json object return json_response( {"url": reverse("layer_upload_metadata", kwargs={"layername": saved_layer.typename}), "success": True} )
def final_step_view(req, upload_session): try: saved_layer = upload.final_step(upload_session, req.user) except upload.LayerNotReady: return json_response({'status': 'pending', 'success': True, 'redirect_to': '/upload/final'}) # this response is different then all of the other views in the # upload as it does not return a response as a json object return json_response( {'url': saved_layer.get_absolute_url(), 'success': True } )
def final_step_view(req, upload_session): try: saved_layer = upload.final_step(upload_session, req.user) except upload.LayerNotReady: return json_response( { "status": "pending", "success": True, "id": req.GET["id"], "redirect_to": "/upload/final" + "?id=%s" % req.GET["id"], } ) # this response is different then all of the other views in the # upload as it does not return a response as a json object return json_response({"url": saved_layer.get_absolute_url(), "success": True})