def make_cylinder_KML(request): if request.method == 'POST': kml_name = request.POST.get('kml_name') color = request.POST.get('color') altitude = int(request.POST.get('altitude')) multiplier = float(request.POST.get('multiplier')) radius = int(request.POST.get('radius')) parseManager = ParseManager.getParseManager("") print parseManager.data print " " print " " print kml_name print color print altitude print multiplier dome_Generator = CylinderGenerator(parseManager.data[0], kml_name, color, altitude, multiplier, radius) dome_Generator.generate() kml_file = Kml(visibility=False) kml_file.file.name = 'kmls_management/static/' + kml_name kml_file.save() request.session.clear() return HttpResponseRedirect('/VYD/KmlManager/kmls') return render(request, 'presentation/presentation_form_cylinder.html')
def make_marker_KML(request): if request.method == 'POST': kml_name = request.POST.get('kml_name') icon_marker = request.POST.get('icon_marker') print " " print " " print kml_name print icon_marker parseManager = ParseManager.getParseManager("") print parseManager.data markerTours = MarkersTour(parseManager.data[0], kml_name, icon_marker) markerTours.makeFile() kml_file = Kml(visibility=False) kml_file.file.name = 'kmls_management/static/' + kml_name kml_file.save() request.session.clear() return HttpResponseRedirect('/VYD/KmlManager/kmls') return render(request, 'presentation/presentation_form_markers.html')