Skip to content

Commit

Permalink
Merge branch 'main' into custom-relationships-staments
Browse files Browse the repository at this point in the history
  • Loading branch information
maxim-f1 authored Aug 22, 2024
2 parents aedcbbb + 869930f commit 03a5414
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
5 changes: 5 additions & 0 deletions sqladmin/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down Expand Up @@ -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",
Expand All @@ -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__(
Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions sqladmin/templates/sqladmin/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<link rel="stylesheet" href="{{ url_for('admin:statics', path='css/select2.min.css') }}">
<link rel="stylesheet" href="{{ url_for('admin:statics', path='css/flatpickr.min.css') }}">
<link rel="stylesheet" href="{{ url_for('admin:statics', path='css/main.css') }}">
{% if admin.logo_url %}
<link rel="icon" href="{{ admin.logo_url}}"/>
{% if admin.favicon_url %}
<link rel="icon" href="{{ admin.favicon_url }}">
{% endif %}
{% block head %}
{% endblock %}
Expand Down

0 comments on commit 03a5414

Please sign in to comment.