Esempio n. 1
0
def tag_archive(tag_filter="all"):
    archive = Article.archive_statistic(author="cxw")
    published_article = Article.tag(tag_filter=tag_filter, author="cxw")
    tags = Article.tag_statistic(author="cxw")
    return render_template("CxwBlog.html",
                           published_article=published_article,
                           archive=archive,
                           tags=tags)
Esempio n. 2
0
def cxw_blog():
    if request.args.get("article", ""):
        return redirect(
            url_for("cxw.cxw_article", uuid=request.args.get("article")))

    archive = Article.archive_statistic(author="cxw")
    tags = Article.tag_statistic(author="cxw")
    published_article = Article.get_published_article(usr='******')
    return render_template("CxwBlog.html",
                           published_article=published_article,
                           archive=archive,
                           tags=tags)
Esempio n. 3
0
def scc_root(page=1):
    recent_articles = Article.recent_articles(author='scc')
    recent_comments = Comment.recent_comments(author='scc')
    archive = Article.archive_statistic(author="scc")
    tags = Article.tag_statistic(author="scc")

    if request.args.get("article", ""):
        # redirect to article URL if get the ?article=uuid
        return redirect(
            url_for("scc.scc_article", uuid=request.args.get("article")))

    pagination = Article.pagination(page=int(request.args.get('page', page)),
                                    author='scc')
    latest_10 = Article.latest_article(page=int(request.args.get('page',
                                                                 page)),
                                       author='scc')
    return render_template('SccBlog.html',
                           latest_10=latest_10,
                           pagination=pagination,
                           recent_articles=recent_articles,
                           recent_comments=recent_comments,
                           archive=archive,
                           tags=tags)