Skip to content
Myr

Correct the order of suggested syntax for extension imports

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

According to https://github.com/mitsuhiko/flask/issues/1092#issuecomment-47118613 and https://github.com/mitsuhiko/flask/pull/1085#issuecomment-45466907 , the correct order to attempt to import extensions should be flask_foo, then flask.ext.foo, then flaskext_foo.

authored by Jeff Widman · committed by Markus Unterwaditzer · parent 5c68b24 · 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/extensiondev.rst+2 added-2 removed
408 unmodified lines
409deprecated ``flaskext.foo``. Flask 0.8 introduces a redirect import410system that lets uses import from ``flask.ext.foo`` and it will try411``flask_foo`` first and if that fails ``flaskext.foo``.412413Flask extensions should urge users to import from ``flask.ext.foo``414instead of ``flask_foo`` or ``flaskext_foo`` so that extensions can413Flask extensions should urge users to import from ``flask_foo``414instead of ``flask.ext.foo`` or ``flaskext_foo`` so that extensions can415transition to the new package name without affecting users.416417418.. _OAuth extension: http://pythonhosted.org/Flask-OAuth/
2 unmodified lines