Commit 1ce71689 authored by Mario Chirinos's avatar Mario Chirinos

websearch

parent 805f1e6b
......@@ -276,6 +276,7 @@ def newsDetails(request, newsId):
form = SearchForm(request.GET)
news = News.objects.get(id=newsId)
for i in request.GET['text'].split():
print("search for: ", i)
txtlen = len(i)
index = news.text.lower().find(i.lower())
if index>0:
......
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