Consistent template naming
The namespace for templates is shared across all blueprints and the application.
E.g. if blueprints A and B both have a "foo.html" file in their template folder, calling render_template("foo.html")
in blueprint A may use the template file from B's template folder (depending on the order the blueprints are added to the application).
While this is useful for customization, we have to make sure to not overwrite something by accident.
Suggestion: Move all blueprint templates into a subfolder named after the blueprint, e.g.:
- "oauth2/templates/error.html" -> "oauth2/templates/oauth2/error.html"
- "session/templates/login.html" -> "session/templates/session/login.html"
- "user/templates/user.html" -> "user/templates/user/user.html" (or maybe "edit.html" instead of "user.html")
Opinions?
See also: https://flask.palletsprojects.com/en/1.1.x/blueprints/#templates
Edited by Julian