[GeoNode-users] Metadata Import with PyCSW

Ariel Nunez ingenieroariel at gmail.com
Wed Jul 22 09:06:17 PDT 2015


Jonas,

I think you can do something like this:

first type: python manage.py shell

and then try to replicate the following lines with the information in the
xml field:
https://github.com/GeoNode/geonode/blob/master/geonode/layers/utils.py#L425

The basic idea is to iterate over the values, set them in the model and
then save.

-a

On Wed, Jul 22, 2015 at 9:25 AM, Jonáš Veselka <jonas.veselka at gisat.cz>
wrote:

> Hi,
> I'm trying to find out how to import metadata.
>
> I'm using GeoNode 2.4b24 with built-in PyCSW. I need to transfer metadata
> from an old app on GeoNode 1.2 and GeoNetwork.
>
> I was thinking about and trying many ways but it always was too
> complicated or somehow impossible. Until I've got an advice from Ariel
> Núñez to place whole XML contents in the field *metadata_xml*, set
> *metadata_uploaded* to true and call PyCSW internals. But how and what to
> call to redistribute metadata in proper places?
> I tried to call *geonode updatelayers -f name_of_the_layer* but it didn't
> change anything.
>
>
> _______________________________________________
> geonode-users mailing list
> geonode-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20150722/03a0979f/attachment.html>


More information about the geonode-users mailing list