Exemplo n.º 1
0
def users_for_wiki(wiki_id):
    """
    Shows the top 10 users for a wiki
    """
    global args
    model = WikiModel(wiki_id, args)
    return render_template(u'authors.html', authors=model.get_authors(limit=12), wiki_api_data=model.api_data)
Exemplo n.º 2
0
def pages_for_wiki(wiki_id):
    """
    Shows the top 10 pages for a wiki by authority
    """
    global args
    model = WikiModel(wiki_id, args)
    return render_template(u'v2_wiki_articles.html', pages=model.get_pages(),
                           wiki_url=model.api_data[u'url'], wiki_title=model.api_data[u'title'], wiki_id=wiki_id)
Exemplo n.º 3
0
def wiki_autocomplete():
    """
    This allows JS typeahead for wikis on the homepage
    """
    global args
    wikis = WikiModel.all_wikis(args)
    return Response(u"var wikis = %s;" % json.dumps(wikis),
                    mimetype=u"application/javascript",
                    content_type=u"application/javascript")
Exemplo n.º 4
0
def topics_for_wiki(wiki_id):
    global args
    model = WikiModel(wiki_id, args)
    return render_template(u'topics.html', topics=model.get_topics(), wiki_api_data=model.api_data)