https://codereview.appspot.com/10971043/diff/7001/MoinMoin/apps/frontend/view... File MoinMoin/apps/frontend/views.py (right): https://codereview.appspot.com/10971043/diff/7001/MoinMoin/apps/frontend/view... MoinMoin/apps/frontend/views.py:270: omitted.append(text) omitted_words = [token.text for token in analyzer(query, removestops=False) if token.stop] https://codereview.appspot.com/10971043/diff/7001/MoinMoin/apps/frontend/view... MoinMoin/apps/frontend/views.py:322: omitted=u', '.join(omitted), better join them in the template? https://codereview.appspot.com/10971043/diff/7001/MoinMoin/templates/search.html File MoinMoin/templates/search.html (right): https://codereview.appspot.com/10971043/diff/7001/MoinMoin/templates/search.h... MoinMoin/templates/search.html:71: <p class="info foundtext">{{ result.highlights('contentngram', result['content'])|safe }}</p> why pass the object to its own method?
Replies https://codereview.appspot.com/10971043/diff/7001/MoinMoin/apps/frontend/view... File MoinMoin/apps/frontend/views.py (right): https://codereview.appspot.com/10971043/diff/7001/MoinMoin/apps/frontend/view... MoinMoin/apps/frontend/views.py:322: omitted=u', '.join(omitted), hmm, can be done. i missed that jinja supports that in the template itself. Should i change for the above lines too ? On 2013/07/08 13:39:09, TheSheep wrote: > better join them in the template? https://codereview.appspot.com/10971043/diff/7001/MoinMoin/templates/search.html File MoinMoin/templates/search.html (right): https://codereview.appspot.com/10971043/diff/7001/MoinMoin/templates/search.h... MoinMoin/templates/search.html:71: <p class="info foundtext">{{ result.highlights('contentngram', result['content'])|safe }}</p> The second argument is the text which is used for highlighting, we can pass anything there, but something has to be passed. its the 'content' here. On 2013/07/08 13:39:09, TheSheep wrote: > why pass the object to its own method?