favicon url

main
Сергей Ванюшкин 2023-10-30 23:46:00 +03:00
parent c2e68881d9
commit 4d3a309940
2 changed files with 9 additions and 1 deletions

View File

@ -184,4 +184,12 @@ def create_app(test_config=None):
url = url_for("uploaded_files", filename=f.filename)
return upload_success(url=url)
@app.route("/favicon.ico")
def favicon():
return send_from_directory(
os.path.join(app.root_path, "static"),
"favicon.ico",
mimetype="image/vnd.microsoft.icon",
)
return app

View File

@ -7,7 +7,7 @@
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
<title>{% block title %}{% endblock title %}</title>
<meta name="description" content="{% block header_description %}{% endblock header_description %}" />
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
<link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}" type="image/x-icon">
{% for h in headers %}
{{h.content | safe}}
{% endfor %}