[Answer]-How to Campare input string with database object

1👍

Look for field lookups in django queryset.

Basically contains and icontains may be what you are looking for:

FeatureCache.objects.filter(project__icontains=feature_name, project__exact=project_id)

which will do case insensitive lookup. Something like this:

featureObjectarray=FeatureCache.objects.filter(project__icontains=feature_name, project__exact=project_id)
if featureObjectarray.exists():
  return render(request,'index.html',{'errmsg':"Folder Found"})
else:
  print feature_name
  print "not Present"
  return render(request,'index.html',{'errmsg':"Folder Not Found"})

Leave a comment