Example #1
0
def by_user_condition(condition):
    queries = []
    res = list(User.select(condition))
    for i, user in enumerate(res):
        queries.append(WebPage.select(WebPage.q.user == user.number))
    return queries
Example #2
0
def get_sentence(filter, sentence):
    bq = BGUQuery(WebPage.get(sentence.metadata['webpage_id']))
    filter.process(list(bq)[sentence.metadata['index']])
    return filter