File size: 748 Bytes
bee9bbb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"""Source-grounded presentation for the Neural Networks course prototype."""

from __future__ import annotations

from pathlib import Path
from typing import Any

from jinja2 import Environment, FileSystemLoader, select_autoescape


TEMPLATE_ROOT = Path(__file__).resolve().parent / "templates"
_TEMPLATES = Environment(
    loader=FileSystemLoader(TEMPLATE_ROOT),
    autoescape=select_autoescape(("html", "xml")),
)


def render_neural_networks_course_body(
    *,
    course: dict[str, Any],
    authenticated: bool,
) -> str:
    """Render the observed public course page with clone-local actions only."""

    return _TEMPLATES.get_template("pages/course_detail.html").render(
        course=course,
        authenticated=authenticated,
    )