0
這裏的時候,我給輸入FEATURE_NAME爲newFeature
,它給我文件夾中找到,但是當我給newFeature123
,它給了我未找到文件夾如何比比與數據庫對象
在功能緩存表中這兩個是newFeature123
和輸入字符串newFeature
。這些文件夾名稱存在,但與newFeature匹配,但不與newFeature123匹配。
views.py:在Django的queryset
def passReviewerProjFeature(request):
if request.method == 'POST':
feature_name = request.POST['tcrsearch_id']
project_id = request.POST['tcrproject_id']
featureObjectarray=FeatureCache.objects.filter(project=project_id)
for object in featureObjectarray:
print object.name
if feature_name not in str(object.name):
print feature_name
print "not Present"
return render(request,'index.html',{'errmsg':"Folder Not Found"})
else:
return render(request,'index.html',{'errmsg':"Folder Found"})