示例#1
0
def article_search_lib(self, tag_id, category_id):
    if tag_id == '':
        articles = Article.by_category(category_id)
        tags, categorys = get_tags_categorys(self)
        return articles, categorys, tags

    articles = Article.by_tag(tag_id)
    tags, categorys = get_tags_categorys(self)
    return articles, categorys, tags
示例#2
0
def get_article_lib(self, category_id):
    try:
        articles = Article.by_category(category_id)
        return articles
    except Exception as e:
        return