Commit 2dc0d527 authored by Mario Chirinos's avatar Mario Chirinos

websearch

parent d1a72133
...@@ -284,8 +284,8 @@ def newsDetails(request, newsId): ...@@ -284,8 +284,8 @@ 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]
print(word)
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