Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 50 lines (40 sloc) 1.584 kB
d0dc89e @justquick in with the new. i have the bits in places where i think they should …
justquick authored
1 # -*- coding: utf-8 -*-
2 """
3 flask
4 ~~~~~
5
6 A microframework based on Werkzeug. It's extensively documented
7 and follows best practice patterns.
8
ee8417d @mitsuhiko Late but 2010 -> 2011 in some files
authored
9 :copyright: (c) 2011 by Armin Ronacher.
d0dc89e @justquick in with the new. i have the bits in places where i think they should …
justquick authored
10 :license: BSD, see LICENSE for more details.
11 """
12
b879193 @mitsuhiko Set current dev version number to 0.10
authored
13 __version__ = '0.10-dev'
3d14654 @mitsuhiko Added release script
authored
14
d0dc89e @justquick in with the new. i have the bits in places where i think they should …
justquick authored
15 # utilities we import from Werkzeug and Jinja2 that are unused
16 # in the module but are exported as public interface.
2866ccd @mitsuhiko Switch to explicit Werkzeug imports
authored
17 from werkzeug.exceptions import abort
18 from werkzeug.utils import redirect
d0dc89e @justquick in with the new. i have the bits in places where i think they should …
justquick authored
19 from jinja2 import Markup, escape
20
80eb6cf @mitsuhiko Switched to relative imports in the package
authored
21 from .app import Flask, Request, Response
22 from .config import Config
b146d82 @mitsuhiko Added wrapper module around simplejson/json for much simplified custo…
authored
23 from .helpers import url_for, flash, send_file, send_from_directory, \
24 get_flashed_messages, get_template_attribute, make_response, safe_join, \
d521899 @mitsuhiko Added flask.stream_with_context
authored
25 stream_with_context
f8f2e2d @mitsuhiko Added more tests for the new stack behavior.
authored
26 from .globals import current_app, g, request, session, _request_ctx_stack, \
27 _app_ctx_stack
086348e @mitsuhiko Added after_this_request decorator.
authored
28 from .ctx import has_request_context, has_app_context, \
29 after_this_request
80eb6cf @mitsuhiko Switched to relative imports in the package
authored
30 from .module import Module
db28217 @mitsuhiko Fixed a bug, view_args not values
authored
31 from .blueprints import Blueprint
80eb6cf @mitsuhiko Switched to relative imports in the package
authored
32 from .templating import render_template, render_template_string
9e1111c @mitsuhiko Fixed JSON availability test. This fixes #77
authored
33
e0712b4 @mitsuhiko Added support for signals
authored
34 # the signals
35 from .signals import signals_available, template_rendered, request_started, \
7f87091 @mitsuhiko Added a missing exposed import. This fixes #575
authored
36 request_finished, got_request_exception, request_tearing_down, \
37 appcontext_tearing_down
e0712b4 @mitsuhiko Added support for signals
authored
38
b146d82 @mitsuhiko Added wrapper module around simplejson/json for much simplified custo…
authored
39 # We're not exposing the actual json module but a convenient wrapper around
40 # it.
41 from . import json
42
43 # This was the only thing that flask used to export at one point and it had
44 # a more generic name.
45 jsonify = json.jsonify
f29ec35 @mitsuhiko Backwards compatibility import
authored
46
47 # backwards compat, goes away in 1.0
48 from .sessions import SecureCookieSession as Session
c3d38a2 @mitsuhiko Removed json_available hack
authored
49 json_available = True
Something went wrong with that request. Please try again.