Skip to content
Myr

extensions.rst

This file

Path

docs/extensions.rst

51 lines · 1.8 KiB

Last changed by

fix some warnings while building docsDavid Lordbefore adoption317d603

History of this file

Take it

The walk stopped after 200 commits: lines older than eca5306 point at it.

fix some warnings while building docsDavid Lordbefore adoption317d603

lines 1–2why, one step back
1.. _extensions:
2

Merge pull request #1262 from msabramo/JSONIFY_END_WITH_NEWLINEMarkus Unterwaditzerbefore adoptioneca5306

lines 3–22why, one step back
3Flask Extensions
4================56Flask extensions extend the functionality of Flask in various different7ways. For instance they add support for databases and other common tasks.89Finding Extensions10------------------1112Flask extensions are listed on the `Flask Extension Registry`_ and can be13downloaded with :command:`easy_install` or :command:`pip`. If you add a Flask extension14as dependency to your :file:`requirements.txt` or :file:`setup.py` file they are15usually installed with a simple command or when your application installs.1617Using Extensions18----------------1920Extensions typically have documentation that goes along that shows how to21use it. There are no general rules in how extensions are supposed to22behave but they are imported from common locations. If you have an

Deprecate flask.extMarkus Unterwaditzerbefore adoptiond3d8a46

lines 23–24why, one step back
23extension called ``Flask-Foo`` or ``Foo-Flask`` it should be always
24importable from ``flask_foo``::

Merge pull request #1262 from msabramo/JSONIFY_END_WITH_NEWLINEMarkus Unterwaditzerbefore adoptioneca5306

line 25why, one step back
25

Deprecate flask.extMarkus Unterwaditzerbefore adoptiond3d8a46

line 26why, one step back
26 import flask_foo

Merge pull request #1262 from msabramo/JSONIFY_END_WITH_NEWLINEMarkus Unterwaditzerbefore adoptioneca5306

lines 27–36why, one step back
27
28Flask Before 0.829----------------3031If you are using Flask 0.7 or earlier the :data:`flask.ext` package will not32exist, instead you have to import from ``flaskext.foo`` or ``flask_foo``33depending on how the extension is distributed. If you want to develop an34application that supports Flask 0.7 or earlier you should still import35from the :data:`flask.ext` package. We provide you with a compatibility36module that provides this package for older versions of Flask. You can

Merge pull request #1277 from iKevinY/doc-fixesMarkus Unterwaditzerbefore adoption82d7c49

line 37why, one step back
37download it from GitHub: `flaskext_compat.py`_

Merge pull request #1262 from msabramo/JSONIFY_END_WITH_NEWLINEMarkus Unterwaditzerbefore adoptioneca5306

lines 38–47why, one step back
38
39And here is how you can use it::4041 import flaskext_compat42 flaskext_compat.activate()4344 from flask.ext import foo4546Once the ``flaskext_compat`` module is activated the :data:`flask.ext` will47exist and you can start importing from there.

Deprecate flask.extMarkus Unterwaditzerbefore adoptiond3d8a46

line 48why, one step back
48

Merge pull request #1262 from msabramo/JSONIFY_END_WITH_NEWLINEMarkus Unterwaditzerbefore adoptioneca5306

lines 49–50why, one step back
49
50.. _Flask Extension Registry: http://flask.pocoo.org/extensions/

Change to Pallets projectJosé Carlos Garcíabefore adoption567fff9

line 51why, one step back
51.. _flaskext_compat.py: https://raw.githubusercontent.com/pallets/flask/master/scripts/flaskext_compat.py