Skip to content

Commit

Permalink
Docs: adding a favicon
Browse files Browse the repository at this point in the history
  • Loading branch information
ElLorans authored Nov 2, 2024
1 parent f082829 commit 11bc145
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -626,3 +626,15 @@ This targets SQLAlchemy specifically.
Unlike the previous setting, this will specifically only affect the behaviour of
IntegrityErrors. These usually come from violations on constraints in the database,
for example trying to insert a row with a primary key that already exists.

Adding a favicon to the admin page
************************************
Adding a favicon to flask-admin is easy: just save a .ico file and add a /favicon.ico
route to your flask app.

from flask import redirect, url_for


@app.route("/favicon.ico")
def favicon():
return redirect(url_for("static", filename="favicon.ico"))

0 comments on commit 11bc145

Please sign in to comment.