Ejemplo n.º 1
0
def _daily_graph_image(day=None):
    if not day:
        day = date.today()

    return HttpResponse(
        plot_to_image_bytes(get_daily_plot(day), format='svg'),
        content_type='image/svg+xml',
    )
Ejemplo n.º 2
0
def _sessions_image(start_day, end_day):
    return HttpResponse(
        plot_to_image_bytes(get_sessions_plot(start_day, end_day), format='svg'),
        content_type='image/svg+xml',
    )
Ejemplo n.º 3
0
def cumulative_group_accounts_graph(request):
    """Graph of total cumulative group accounts over time."""
    return HttpResponse(
        plot_to_image_bytes(_cumulative_group_accounts_graph(), format="svg"), content_type="image/svg+xml"
    )
Ejemplo n.º 4
0
def accounts_created_each_day_graph(request):
    """Graph of accounts created each day."""
    return HttpResponse(
        plot_to_image_bytes(_accounts_created_each_day_graph(), format="svg"), content_type="image/svg+xml"
    )
Ejemplo n.º 5
0
def _sessions_image(start_day, end_day):
    return HttpResponse(
        plot_to_image_bytes(get_sessions_plot(start_day, end_day),
                            format='svg'),
        content_type='image/svg+xml',
    )