Skip to content
Myr

Added a note on references to static folders

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 54ebd88 · Browse files · 1 file+15 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+15 added−0 removed

  • other:+15 added−0 removed

1 file+15 added−0 removed

modified:docs/patterns/packages.rst+15 added
241 unmodified lines
242name of the module. So for the admin it would be243``render_template('admin/list_items.html')`` and so on. It is not244possible to refer to templates without the prefixed module name. This is245explicit unlike URL rules.246247.. admonition:: References to Static Folders248249 Please keep in mind that if you are using unqualified endpoints by250 default Flask will always assume the module's static folder, even if251 there is no such folder.252253 If you want to refer to the application's static folder, use a leading254 dot::255256 # this refers to the application's static folder257 url_for('.static', filename='static.css')258259 # this refers to the current module's static folder260 url_for('static', filename='static.css')