mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-09 05:58:11 +08:00
Serving favicon correctly
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 4.4 KiB |
@@ -1,7 +1,9 @@
|
|||||||
|
import os
|
||||||
from flask import (
|
from flask import (
|
||||||
Blueprint, render_template, url_for, current_app
|
Blueprint, render_template, send_from_directory, current_app
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
bp = Blueprint("webapp", __name__, template_folder="templates")
|
bp = Blueprint("webapp", __name__, template_folder="templates")
|
||||||
|
|
||||||
|
|
||||||
@@ -21,4 +23,4 @@ def swag():
|
|||||||
# renders swagger documentation
|
# renders swagger documentation
|
||||||
@bp.route("/favicon.png")
|
@bp.route("/favicon.png")
|
||||||
def favicon():
|
def favicon():
|
||||||
return url_for("static", filename="img/favicon.png")
|
return send_from_directory(os.path.join(bp.root_path, "static/img/"), "favicon.png")
|
||||||
|
|||||||
Reference in New Issue
Block a user