Commit db804612 authored by Mario Chirinos's avatar Mario Chirinos

websearch

parent 5c8449c9
...@@ -283,6 +283,7 @@ def newsDetails(request, newsId): ...@@ -283,6 +283,7 @@ def newsDetails(request, newsId):
print("search for: ", i) print("search for: ", i)
txtlen = len(i) txtlen = len(i)
index = news.text.lower().find(i.lower()) index = news.text.lower().find(i.lower())
print("index:", i, index)
if index>0: if index>0:
word = news.text[index:index+txtlen] word = news.text[index:index+txtlen]
print(word) print(word)
......
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