Commit 805f1e6b authored by Mario Chirinos's avatar Mario Chirinos

websearch

parent 05b5915c
...@@ -279,6 +279,7 @@ def newsDetails(request, newsId): ...@@ -279,6 +279,7 @@ def newsDetails(request, newsId):
txtlen = len(i) txtlen = len(i)
index = news.text.lower().find(i.lower()) index = news.text.lower().find(i.lower())
if index>0: if index>0:
print(word)
word = news.text[index:index+txtlen] word = news.text[index:index+txtlen]
news.text = news.text.replace(word, "<b>"+word+"</b>") news.text = news.text.replace(word, "<b>"+word+"</b>")
return render(request,'new/newsDetails.html',{"form":form,"news":news}) return render(request,'new/newsDetails.html',{"form":form,"news":news})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment