[GeoNode-users] Upload documents in bulk
Sachindra Singh
sachin1618 at gmail.com
Mon Oct 26 16:12:38 PDT 2015
I use the following scripts to batch upload documents and secure them in
2.4.x - https://gist.github.com/sopac/2ef0a2cbdf50a21d25af
S.
On Tue, Oct 13, 2015 at 1:56 AM, Nic Tait <ngtait at gmail.com> wrote:
> Thanks Paolo, I have been experimenting with the Document model as a way
> to do this with some success so far
>
> - Nic
>
> On Mon, Oct 12, 2015 at 7:40 AM, Paolo Corti <pcorti at gmail.com> wrote:
>
>> Do something like this (not tested):
>>
>> from geonode.documents.models import Document
>>
>> doc_list = [
>> {'title': 'title0', 'doc_file': '/path/to/file/0'},
>> {'title': 'title1', 'doc_file': '/path/to/file/1'},
>> {'title': 'title2', 'doc_file': '/path/to/file/2'},
>> ]
>>
>> owner = Profile.objects.all()[0] # change according to your needs
>>
>> for doc in doc_list:
>> doc = Document(
>> title = doc['title'],
>> doc_file = doc['doc_file'],
>> owner = owner
>> )
>> doc.save()
>>
>> hope it helps
>> p
>>
>> On Tue, Oct 6, 2015 at 3:12 PM, Nic Tait <ngtait at gmail.com> wrote:
>> > Hi all,
>> >
>> > Would like to be able to use Geonode as a map catalog for a large
>> number of
>> > pdf / png files but not sure of the best way to do this in bulk?
>> Cannot see
>> > anything in the documentation to do this so wondering if I need to
>> create a
>> > python script using the django models - has anyone done anything
>> similar ?
>> >
>> > Thanks,
>> > Nic
>> >
>> > _______________________________________________
>> > geonode-users mailing list
>> > geonode-users at lists.osgeo.org
>> > http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users
>> >
>>
>>
>>
>> --
>> Paolo Corti
>> Geospatial software developer
>> web: http://www.paolocorti.net
>> twitter: @capooti
>> skype: capooti
>>
>
>
> _______________________________________________
> 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/20151027/29408efb/attachment.html>
More information about the geonode-users
mailing list