Ejemplo n.º 1
0
def exportShapefile(request, shapefile_id):
    """ Let the user export the given shapefile.
    """
    shapefile = Shapefile.objects.get(id=shapefile_id)
    if shapefile != None:
        return shapefileIO.exportData(shapefile)
    else:
        return HttpResponseRedirect("/shape-editor")
Ejemplo n.º 2
0
def exportShapefile(request, shapefile_id):
    try:
        shapefile = Shapefile.objects.get(id=shapefile_id)
    except Shapefile.DoesNotExist:
        raise Http404
    return shapefileIO.exportData(shapefile)
Ejemplo n.º 3
0
def exportShapefile(request, shapefile_id):
    try:
        shapefile = Shapefile.objects.get(id=shapefile_id)
    except Shapefile.DoesNotExist:
        raise Http404
    return shapefileIO.exportData(shapefile)