[GeoNode-devel] [GeoNode-users] Upload documents in bulk

Jeffrey Johnson ortelius at gmail.com
Mon Oct 26 17:19:47 PDT 2015


Sachin,

Can you send a PR for a new management command that does this and try
to slip it in before 2.4 final? Im happy to review and have been asked
for this several times so will test carefully. I wonder how we could
best support metadata as an xml next to it. Tom, any ideas on that?

Jeff

On Mon, Oct 26, 2015 at 4:12 PM, Sachindra Singh <sachin1618 at gmail.com> wrote:
> 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
>>
>
>
> _______________________________________________
> geonode-users mailing list
> geonode-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geonode-users
>


More information about the geonode-devel mailing list