@require_server_admin
@has_request_variables
def stats_for_realm(request: HttpRequest, realm_str: str) -> HttpResponse:
    try:
        realm = get_realm(realm_str)
    except Realm.DoesNotExist:
        return HttpResponseNotFound(f'Realm {realm_str} does not exist')
    return render_stats(request, f'/realm/{realm_str}', (realm.name or realm.string_id), analytics_ready=is_analytics_ready(realm))
@require_server_admin
@has_request_variables
def stats_for_realm(request: HttpRequest, realm_str: str) -> HttpResponse:
    try:
        realm = get_realm(realm_str)
    except Realm.DoesNotExist:
        return HttpResponseNotFound(f'Realm {realm_str} does not exist')
    return render_stats(request, f'/realm/{realm_str}', (realm.name or realm.string_id), analytics_ready=is_analytics_ready(realm))