diff --git a/pyproject.toml b/pyproject.toml index 0683cd72..b765f014 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -95,7 +95,7 @@ dependencies = [ dependencies = [ "mkdocs-material==9.1.3", "mkdocs==1.4.2", - "mkdocstrings[python]==0.20.0", + "mkdocstrings[python]==0.25.0", ] [tool.hatch.envs.test.scripts] diff --git a/sqladmin/application.py b/sqladmin/application.py index c0660e61..74f31142 100644 --- a/sqladmin/application.py +++ b/sqladmin/application.py @@ -68,6 +68,7 @@ def __init__( base_url: str = "/admin", title: str = "Admin", logo_url: str | None = None, + favicon_url: str | None = None, templates_dir: str = "templates", middlewares: Sequence[Middleware] | None = None, authentication_backend: AuthenticationBackend | None = None, @@ -78,6 +79,7 @@ def __init__( self.templates_dir = templates_dir self.title = title self.logo_url = logo_url + self.favicon_url = favicon_url if session_maker: self.session_maker = session_maker @@ -340,6 +342,7 @@ def __init__( base_url: str = "/admin", title: str = "Admin", logo_url: str | None = None, + favicon_url: str | None = None, middlewares: Sequence[Middleware] | None = None, debug: bool = False, templates_dir: str = "templates", @@ -353,6 +356,7 @@ def __init__( base_url: Base URL for Admin interface. title: Admin title. logo_url: URL of logo to be displayed instead of title. + favicon_url: URL of favicon to be displayed. """ super().__init__( @@ -362,6 +366,7 @@ def __init__( base_url=base_url, title=title, logo_url=logo_url, + favicon_url=favicon_url, templates_dir=templates_dir, middlewares=middlewares, authentication_backend=authentication_backend, diff --git a/sqladmin/templates/sqladmin/base.html b/sqladmin/templates/sqladmin/base.html index 3e464995..2524648b 100644 --- a/sqladmin/templates/sqladmin/base.html +++ b/sqladmin/templates/sqladmin/base.html @@ -10,8 +10,8 @@ - {% if admin.logo_url %} - + {% if admin.favicon_url %} + {% endif %} {% block head %} {% endblock %}