Skip to content

Commit

Permalink
- Returns referencing infos on Layers Upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessio Fabiani committed Sep 4, 2017
1 parent 13f9a86 commit c140c77
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions geonode/upload/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,12 +552,25 @@ def final_step_view(req, upload_session):

# 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
}
)

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:
json_response = json_response(
{'url': saved_layer.get_absolute_url(),
'success': True
}
)
return json_response

_steps = {
'save': save_step_view,
Expand Down

0 comments on commit c140c77

Please sign in to comment.