[GeoNode-users] Query recent maps in views.py

Simone Dalmasso simone.dalmasso at gmail.com
Wed Sep 20 06:38:12 PDT 2017


Hi,

what you need is not trivial. GeoNode doesn't have a model for Thumbnails,
they are managed through Links (
https://github.com/GeoNode/geonode/blob/2.6.x/geonode/base/models.py#L892),
but a Link doesn't have a timestamp for its creation, so you would need
something to read the files from the disk.

Maybe the way to go could be to create your own model for recent thumbnails
and update their status in the db through a cron celery task. So your view
would easily read from it.

Hope it helps and others ideas are welcome.

2017-09-20 10:35 GMT+02:00 Arisandi, Donny (ICRAF) <D.Arisandi at cgiar.org>:

> Dear all,
>
>
>
> I need your help to create query in views.py to show recent map thumbnail.
> Could you show me the sample how to do it?
>
>
>
> Thank you
>
> D
>
> _______________________________________________
> geonode-users mailing list
> geonode-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geonode-users
>
>


-- 
Simone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20170920/077bdcc9/attachment.html>


More information about the geonode-users mailing list