in my project i have 3 action for users , my quest. is how can i route them
my code:
def featuresave(request):
layerId = request.POST.get("layid")
features = request.POST.get("feat")
if features == 'POINT': #( it includes Point string and coordinate as "POINT(38 39)"
als = Point()
als.layer = Layers.objects.get(id = layerId)
als.feature = features
als.save()
if feature == 'LINESTRING': #( it includes Linestring string and coordinate )
als = Line()
als.layer = Layers.objects.get(id = layerId)
als.feature = feature
als.save()
if feature == 'POLYGON': #( it includes Linestring string and coordinate )
als = Poly()
als.layer = Layers.objects.get(id = layerId)
als.feature = feature
als.save()
return HttpResponse("OK")
thanks for your help
Looking at your comments, and assuming you are talking about what your request.POST.feat includes:
and the comparisons before the comments… you aren’t going to get a match…
Your comparisons should probably be something like