Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using sample code in favicon documentation #5688

Open
AluminumAngel opened this issue Mar 2, 2025 · 1 comment
Open

Error using sample code in favicon documentation #5688

AluminumAngel opened this issue Mar 2, 2025 · 1 comment

Comments

@AluminumAngel
Copy link

The code sample gives the assert view_func is not None, "expected view func if endpoint is not provided.".

Documentation in question: https://flask.palletsprojects.com/en/stable/patterns/favicon/

Sample code in question:

app.add_url_rule('/favicon.ico',
                 redirect_to=url_for('static', filename='favicon.ico'))
@AluminumAngel
Copy link
Author

Issue is resolved by adding an endpoint parameter to the add_url_rule call.

Perhaps the documentation needs to be updated. Or there is something else wrong with my test case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant