[GeoNode-devel] Updating layer title, publishing date from remote script?

Bruce Crevensten becrevensten at alaska.edu
Thu Nov 5 08:53:35 PST 2015

Thanks Simone!  I'll file tickets and work towards PRs on these items.

On Wed, Nov 4, 2015 at 10:41 PM, Simone Dalmasso <simone.dalmasso at gmail.com>

> Hi Bruce,
> good points, the updatelayers command is not updating the title, this is
> the code called
> https://github.com/GeoNode/geonode/blob/master/geonode/geoserver/helpers.py#L353 we
> need some refactor here to make it respect all the changes. The title is
> updated if changed from the layer's metadata page though.
> About the maplayers, there's no code that updates the layer_params and
> would be good to enhance the updatemaplayer_ip command
> https://github.com/GeoNode/geonode/blob/master/geonode/maps/management/commands/updatemaplayerip.py,
> to do all the necessary tasks so to be a more generic updatemaplayer.
> If you can provide PRs on that would be awesome, can you fill a couple of
> tickets in github? there's already one for updatelayers
> https://github.com/GeoNode/geonode/issues/2177.
> 2015-11-04 23:57 GMT+01:00 Bruce Crevensten <becrevensten at alaska.edu>:
>> Hi, I'm working on an application that uses GeoNode to manage geospatial
>> information, and I need to set up a routine that replaces layer content on
>> a daily basis.
>> I can use the manage.py utility to update the underlying data source,
>> apparently with no problems.  I forked & made a small change to the
>> layers/management/commands/importlayers.py & layers/utils.py script to
>> allow an explicit layer --name to be provided so we have a constant slug to
>> use for updating the layer (otherwise, we get new layers for every changed
>> title):
>> https://github.com/ua-snap/geonode/pull/7/files
>> (I'll work that into a candidate PR once I have all the functionality I
>> want working).
>> I'd also like to be able to change the layer's title (both in the catalog
>> of layers as well as on any layers being used in maps) and publishing date
>> to reflect the changing date of the data.  From what I can tell, the code
>> isn't updating the title at all, and I'm not clear if this is expected
>> behavior (when updating an existing layer & overwrite = true, the title
>> isn't updated) or if perhaps I've unwittingly broken something.
>> Related, I'm unclear as to how to change the title of a mapLayer.
>> Doesn't look like the API currently supports this, or that there are any
>> existing management tools to do it.  I know the mapLayer takes its title
>> from the title of the Layer upon creation, but subsequent updating seems to
>> be done via GeoExplorer.  Any suggestions on how I may want to approach
>> this?
>> Thanks!
>> --
>> *Bruce Crevensten*
>> *Senior Software Engineer*
>> (SNAP) Scenarios Network for Alaska & Arctic Planning
>> www.snap.uaf.edu
>> _______________________________________________
>> geonode-devel mailing list
>> geonode-devel at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/geonode-devel
> --
> Simone

*Bruce Crevensten*

*Senior Software Engineer*
(SNAP) Scenarios Network for Alaska & Arctic Planning
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-devel/attachments/20151105/a5b171e1/attachment.html>

More information about the geonode-devel mailing list