-
Notifications
You must be signed in to change notification settings - Fork 1.2k
metadata XML upload #394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
metadata XML upload #394
Conversation
|
||
if 'xml' in files: | ||
md_xml, md_title, md_abstract = update_metadata(layer_uuid, open(files['xml']).read(), saved_layer) | ||
Layer.objects.filter(uuid=layer_uuid).update( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This model update looks a lot like the 4 lines following (492-495). Is there something I'm missing?
The use case we have in the bank for this is the following: We receive the metadata from consultants in ISO format, but would like to use GeoNode to keep it up to date. Using GeoNode as a metadata editor, since the people editing it are not going to be the ones who created it in the first place. As such, the main use for this functionality would be to upload data in xml format (for the initial values) and edit after that. This pull request blocks the ability for people to edit metadata even if they had an xml file that only contained title and nothing else, as such I am -1 on merging it until editing metadata is supported. |
To be clear, @ingenieroariel, you want the user to be able to upload xml On Wed, Sep 19, 2012 at 9:04 AM, Ariel Núñez [email protected]:
|
@ingenieroariel the main drawback is that if someone uploads a rich XML document, given that GeoNode's Layer model is a limited subset, parsing the XML to GeoNode model.will result in a lossy transfer. The blocking is by design so that edits are done via XML if XML was the initial upload mechanism (if I had an XML document with a single element, I wouldn't upload it at all and just use the editor). This has been discussed previously, and is a known limitation. Options:
|
I think we need to go with this second option here in the short term and On Wed, Sep 19, 2012 at 9:49 AM, Tom Kralidis [email protected]:
|
I agree with Jeffrey, let's go with option 2. On Wed, Sep 19, 2012 at 12:52 PM, Jeffrey Johnson
|
I think its even ok to include this kind of 'warning' right in the form On Wed, Sep 19, 2012 at 9:54 AM, Ariel Núñez [email protected]:
|
@ingenieroariel @jj0hns0n : updates made per recommendation. For review and comment. |
metadata XML upload
This PR allows for users to upload an XML metadata document as part of their data upload. Notes:
This will likely bring up issues of signals and what fields should go where again, hence I've not included tests until we agree (where tests will go will depend on this discussion).