Created
August 9, 2018 16:06
-
-
Save capooti/39c673867926327702793cab21ee4519 to your computer and use it in GitHub Desktop.
GeoNode: export title and url for all maps (run this from the Django shell)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
from geonode.maps.models import Map | |
with open('maps_export.csv', mode='w') as export_file: | |
export_writer = csv.writer(export_file, delimiter=',', quotechar='"', quoting=csv.QUOTE_MINIMAL) | |
for map in Map.objects.all(): | |
export_writer.writerow([map.title, map.get_absolute_url()]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment