コード例 #1
0
def archive_view(request):
    """List of year and months with the number of entries related.
    """
    bp = BlogPage(request.LANGUAGE_CODE)
    return HttpResponse(
        _archivepage_template_gen(request, 'blog/archives.html',
                                  bp.archived_years()))
コード例 #2
0
def archive_month_request(request, month_id, year_id):
    """List of entries related to a specific year and month"""
    bp = BlogPage(request.LANGUAGE_CODE)
    return HttpResponse(
        _archivepage_template_gen(request, 'blog/main.html',
                                  bp.posts_month(month_id, year_id)))