INNER CODE UNIT · Python

favicon

stanfrbd/cyberbro · app.py:312

def favicon() -> Response:
    """Serve the favicon."""
    return send_from_directory(
        Path(app.root_path) / "images",
        "favicon.ico",
        mimetype="image/vnd.microsoft.icon",
    )


@app.errorhandler(404)
def page_not_found(_) -> tuple[str, int]:
    """Handle 404 errors."""
    return render_template("404.html"), 404


@app.errorhandler(500)
def internal_server_error(_) -> tuple[str, int]:
    """Handle 500 errors."""

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…