[GeoNode-devel] GeoNode UpdateLayers in Admin interface

Simone Dalmasso simone.dalmasso at gmail.com
Fri May 12 04:56:00 PDT 2017


that's good enough I think.

2017-05-12 13:27 GMT+02:00 <Martino.BONI at ext.ec.europa.eu>:

> Ok,
>
> yes I did a view in a specific app for this using also a template cloned
> form other apps where I check:
>
> @login_required
> def runsync(request,template='syncgeogeo/syncgeogeo.html'):
>     if request.user.is_superuser:
>         ...
>
> Is it enough safe?
>
> I will replace maybe the name syncgeogeo with updatelayers to keep track
> of what it is doing.
> And I will change the url from /updatelayers to admin/updatelayers and put
> it on the top.
>
> thanks.
>
> Martino.
>
>
> ------------------------------
> *From:* Simone Dalmasso [simone.dalmasso at gmail.com]
> *Sent:* 12 May 2017 12:12
> *To:* BONI Martino (JRC-ISPRA-EXT)
> *Cc:* geonode-devel at lists.osgeo.org
> *Subject:* Re: [GeoNode-devel] GeoNode UpdateLayers in Admin interface
>
> Glad you solved,
>
> not sure about what's the best way to do that, maybe not directly through
> the admin but it can be a "fake" admin. A django view, password protected
> that responds only to the url /admin/updatelayers.
> This url should be one of the first in the url mappings.
>
> But try to take a look at the django documentation anyway.
>
> Best
>
> 2017-05-12 11:21 GMT+02:00 <Martino.BONI at ext.ec.europa.eu>:
>
>> Dear Simone,
>>
>> thanks, it solved, there were some thumbnails, previously saved from an
>> other user and it was not possible for Apache to overwrite them; deleted
>> and now it is working.
>>
>> By the way my app now is working  through a specific url
>> (<baseurl>/updatelayers), is it possible to include this management app
>> under the admin interface (eg. <baseurl>/admin/updatelayers) ? can you
>> give me some hints or documentation to work on this.
>>
>> Super thanks and regards,
>>
>> Martino.
>>
>> ------------------------------
>> *From:* BONI Martino (JRC-ISPRA-EXT)
>> *Sent:* 12 May 2017 10:21
>> *To:* Simone Dalmasso
>> *Cc:* geonode-devel at lists.osgeo.org
>> *Subject:* RE: [GeoNode-devel] GeoNode UpdateLayers in Admin interface
>>
>> Hi Simone,
>>
>> thanks for your reply, I will check the folder and file permission and
>> let you know if this fixes the issue.
>>
>> Thanks for your time.
>>
>> Martino.
>>
>> ------------------------------
>> *From:* Simone Dalmasso [simone.dalmasso at gmail.com]
>> *Sent:* 11 May 2017 21:16
>> *To:* BONI Martino (JRC-ISPRA-EXT)
>> *Cc:* geonode-devel at lists.osgeo.org
>> *Subject:* Re: [GeoNode-devel] GeoNode UpdateLayers in Admin interface
>>
>> Hi this error, as it says, is a permission denied in writing the
>> thumbnail to the disk. Make sure the uploaded folder has write permissions
>> to the user launching the command.
>>
>> 2017-05-11 19:11 GMT+02:00 <Martino.BONI at ext.ec.europa.eu>:
>>
>>> Dear all,
>>>
>>> is it possible to call the command
>>>
>>> *python manage.py updatelayers*
>>>
>>> from the admin interface of GeoNode?
>>>
>>> I tried to make my own app and call the command through *call_command()* in
>>> a view but I got the error reported below.
>>> My skill with Django are quite poor.. does anyone have already add the
>>> command to the admin interface?
>>>
>>> I would like to update my layers to the Postgis store that I have
>>> already set in geoserver and then publish the layer from geoserver, finally
>>> call the command. I need to do the upload in this way due to the huge size
>>> of some layers that I can not upload directly from geonode.. seems it goes
>>> in timeout.. but maybe I'm wrong. Moreover I do not have access to the
>>> command line of the production VM where the geonode is installed.
>>>
>>> thanks in advance,
>>>
>>> Martino.
>>>
>>> ------------------------------------------------------------
>>> ---------------------------
>>> Exception at /syncgeogeo/runsync
>>>
>>> ('Failed to process SGDB_PTR', IOError(13, 'Permission denied'))
>>>
>>> Request Method: GET
>>> Request URL: ....
>>> Django Version: 1.6.10
>>> Exception Type: Exception
>>> Exception Value:
>>>
>>> ('Failed to process SGDB_PTR', IOError(13, 'Permission denied'))
>>>
>>> Exception Location: /srv/www/geonode/geonode/base/models.py in
>>> save_thumbnail, line 564
>>> Python Executable: /usr/bin/python
>>> Python Version: 2.7.5
>>> Python Path:
>>>
>>> ['/usr/lib/python2.7/site-packages/pip-6.1.1-py2.7.egg',
>>>  '/srv/www/geonode',
>>>  '/usr/lib64/python27.zip',
>>>  '/usr/lib64/python2.7',
>>>  '/usr/lib64/python2.7/plat-linux2',
>>>  '/usr/lib64/python2.7/lib-tk',
>>>  '/usr/lib64/python2.7/lib-old',
>>>  '/usr/lib64/python2.7/lib-dynload',
>>>  '/usr/lib64/python2.7/site-packages',
>>>  '/usr/lib64/python2.7/site-packages/gtk-2.0',
>>>  '/usr/lib/python2.7/site-packages',
>>>  '/usr/share/httpd']
>>>
>>> Server time: Thu, 11 May 2017 18:47:12 +0200
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> geonode-devel mailing list
>>> geonode-devel at lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/geonode-devel
>>>
>>>
>>
>>
>> --
>> Simone
>>
>
>
>
> --
> Simone
>



-- 
Simone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-devel/attachments/20170512/0601cc5f/attachment-0001.html>


More information about the geonode-devel mailing list