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")
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")
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}))
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 }))