Browse Source

Correct the order of suggested syntax for extension imports

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:
1) flask_foo
2) flask.ext.foo
3) flaskext_foo.
pull/1219/head
Jeff Widman 10 years ago
parent
commit
4cf3d5a39f
  1. 4
      docs/extensiondev.rst

4
docs/extensiondev.rst

@ -410,8 +410,8 @@ deprecated ``flaskext.foo``. Flask 0.8 introduces a redirect import
system that lets uses import from ``flask.ext.foo`` and it will try
``flask_foo`` first and if that fails ``flaskext.foo``.
Flask extensions should urge users to import from ``flask.ext.foo``
instead of ``flask_foo`` or ``flaskext_foo`` so that extensions can
Flask extensions should urge users to import from ``flask_foo``
instead of ``flask.ext.foo`` or ``flaskext_foo`` so that extensions can
transition to the new package name without affecting users.

Loading…
Cancel
Save