Skip to content

Instantly share code, notes, and snippets.

@capooti
Created August 9, 2018 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save capooti/39c673867926327702793cab21ee4519 to your computer and use it in GitHub Desktop.
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)
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