Example #1
0
def feed_list(request):
    """
    A list of all the RSS feeds we provide.
    """
    object_list = Author.all().order("name")
    context = {
        'object_list': object_list,
        'selected': 'feed_list',
    }
    return direct_to_template(request, 'feed_list.html', context)
Example #2
0
def byline_list(request):
    """
    A list of all the Authors we have archived.
    """
    object_list = Author.all().order("name")
    context = {
        'object_list': object_list,
        'selected': 'byline_list',
    }
    return direct_to_template(request, 'byline_list.html', context)
Example #3
0
def byline_scoreboard(request):
    """
    A ranking of the authors by number of bylines
    """
    object_list = Author.all().order("-story_count")
    context = {
        'object_list': object_list,
        'selected': 'byline_scoreboard',
    }
    return direct_to_template(request, 'byline_scoreboard.html', context)
Example #4
0
def update_daily_average_for_all_authors(request):
    """
    Updates the daily average for all Authors.
    """
    logging.info("Updating daily average for all Authors")
    [taskqueue.add(
        url = '/_update_daily_average_for_author/',
        params = {'key' : i.key()},
        method='GET'
    ) for i in Author.all()]
    return HttpResponse('ok!')
Example #5
0
def update_story_count_for_all_authors(request):
    """
    Updates the story count for all Authors.
    """
    logging.info("Updating story count for all Authors")
    [taskqueue.add(
        url = '/_update_story_count_for_author/',
        params = {'key' : i.key()},
        method='GET'
    ) for i in Author.all()]
    return HttpResponse('ok!')