Commit 08bda44f by Chris Johnson

GUI draft

parent 54469afe
Showing with 6 additions and 2 deletions
......@@ -129,8 +129,8 @@ class SearchResults:
return False
except:
pass
if 'views' in self.__filters:
if self.__filters['views'] > outer_article.views:
if 'num_views' in self.__filters:
if self.__filters['num_views'] > outer_article.views:
return False
return True
......@@ -153,8 +153,12 @@ class SearchResults:
forbidden_words[0] = forbidden_words[0][1:]
return forbidden_words
inappropiate_words = []
def passes_all_filters(self, article):
if 'child_safe' in self.__filters:
if self.__filters['child_safe']:
self.__forbidden_words += inappropiate_words
if 'pct_helpful' in self.__filters:
if article.pct_helpful < self.__filters['pct_helpful']:
return False
......
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 sign in to comment