@require_server_admin
def get_user_activity(request: HttpRequest, email: str) -> HttpResponse:
    records = get_user_activity_records_for_email(email)
    data: List[Tuple[(str, str)]] = []
    user_summary = get_user_activity_summary(records)
    content = user_activity_summary_table(user_summary)
    data += [('Summary', content)]
    content = raw_user_activity_table(records)
    data += [('Info', content)]
    title = email
    return render(request, 'analytics/activity.html', context=dict(data=data, title=title))
@require_server_admin
def get_user_activity(request: HttpRequest, email: str) -> HttpResponse:
    records = get_user_activity_records_for_email(email)
    data: List[Tuple[(str, str)]] = []
    user_summary = get_user_activity_summary(records)
    content = user_activity_summary_table(user_summary)
    data += [('Summary', content)]
    content = raw_user_activity_table(records)
    data += [('Info', content)]
    title = email
    return render(request, 'analytics/activity.html', context=dict(data=data, title=title))