Skip to content
Myr

Merge pull request #1247 from Winnetou/patch-8

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

Minor typos

authored by Markus Unterwaditzer · committed by Markus Unterwaditzer · parents eea9342, 091852e · Browse files · 1 file+2 added−2 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+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:docs/patterns/lazyloading.rst+2 added-2 removed
30 unmodified lines
31 @app.route('/user/<username>')32 def user(username):33 pass3435Then the centralized approach you would have one file with the views35Then, with the centralized approach you would have one file with the views36(:file:`views.py`) but without any decorator::3738 def index():39 pass
13 unmodified lines
53Loading Late54------------5556So far we only split up the views and the routing, but the module is still57loaded upfront. The trick to actually load the view function as needed.57loaded upfront. The trick is to actually load the view function as needed.58This can be accomplished with a helper class that behaves just like a59function but internally imports the real function on first use::6061 from werkzeug import import_string, cached_property
43 unmodified lines