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 flask_foo, then flask.ext.foo, then flaskext_foo.
pull/1220/head
Jeff Widman 10 years ago committed by Markus Unterwaditzer
parent
commit
f05aeea6dd
  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