Example #1
0
def source_analytics(req, n):
    pages, chart_stats = doc_analytics.get_page_stats(n)
    highlights = doc_analytics.get_highlights(n)
    source = M.Source.objects.get(pk=n)
    var_dict = {
        'source': source,
        'pages': pages,
        'chart_stats': chart_stats,
        'highlights': highlights,
        'numpages': source.numpages
    }
    return __serve_page_with_vars(req, 'web/source_analytics.html', var_dict, content_type="text/html")
Example #2
0
def source_analytics(req, n):
    pages, chart_stats = doc_analytics.get_page_stats(n)
    highlights = doc_analytics.get_highlights(n)
    source = M.Source.objects.get(pk=n)
    var_dict = {
        "source": source,
        "pages": pages,
        "chart_stats": chart_stats,
        "highlights": highlights,
        "numpages": source.numpages,
    }
    return __serve_page_with_vars(req, "web/source_analytics.html", var_dict, content_type="text/html")
Example #3
0
def source_analytics(req, n):
    pages, chart_stats = doc_analytics.get_page_stats(n)
    highlights = doc_analytics.get_highlights(n)
    source = M.Source.objects.get(pk=n)
    var_dict = {
        'source': source,
        'pages': pages,
        'chart_stats': chart_stats,
        'highlights': highlights,
        'numpages': source.numpages
    }
    return __serve_page_with_vars(req,
                                  'web/source_analytics.html',
                                  var_dict,
                                  content_type="text/html")
Example #4
0
def source_analytics(req, n):
    pages, chart_stats = doc_analytics.get_page_stats(n)
    highlights = doc_analytics.get_highlights(n)
    source = M.Source.objects.get(pk=n)
    var_dict = {
        'source': source,
        'pages': pages,
        'chart_stats': chart_stats,
        'highlights': highlights,
        'numpages': source.numpages
    }
    return HttpResponse(UR.prepare_response({"source": UR.model2dict(source),
                                             "pages": pages,
                                             "chart_stats": chart_stats,
                                             "highlights": highlights,
                                             "numpages": source.numpages}))
Example #5
0
def source_analytics(req, n):
    pages, chart_stats = doc_analytics.get_page_stats(n)
    highlights = doc_analytics.get_highlights(n)
    source = M.Source.objects.get(pk=n)
    var_dict = {
        'source': source,
        'pages': pages,
        'chart_stats': chart_stats,
        'highlights': highlights,
        'numpages': source.numpages
    }
    return HttpResponse(
        UR.prepare_response({
            "source": UR.model2dict(source),
            "pages": pages,
            "chart_stats": chart_stats,
            "highlights": highlights,
            "numpages": source.numpages
        }))