Browse Source

Switched to relative imports in the package

pull/112/head
Armin Ronacher 15 years ago
parent
commit
80eb6cfffc
  1. 14
      flask/__init__.py
  2. 16
      flask/app.py
  3. 4
      flask/ctx.py
  4. 4
      flask/helpers.py
  5. 2
      flask/templating.py
  6. 2
      flask/wrappers.py

14
flask/__init__.py

@ -15,14 +15,14 @@
from werkzeug import abort, redirect from werkzeug import abort, redirect
from jinja2 import Markup, escape from jinja2 import Markup, escape
from flask.app import Flask, Request, Response from .app import Flask, Request, Response
from flask.config import Config from .config import Config
from flask.helpers import url_for, jsonify, json_available, flash, \ from .helpers import url_for, jsonify, json_available, flash, \
send_file, get_flashed_messages, get_template_attribute send_file, get_flashed_messages, get_template_attribute
from flask.globals import current_app, g, request, session, _request_ctx_stack from .globals import current_app, g, request, session, _request_ctx_stack
from flask.module import Module from .module import Module
from flask.templating import render_template, render_template_string from .templating import render_template, render_template_string
# only import json if it's available # only import json if it's available
if json_available: if json_available:
from flask.helpers import json from .helpers import json

16
flask/app.py

@ -22,15 +22,15 @@ from werkzeug import ImmutableDict, create_environ
from werkzeug.routing import Map, Rule from werkzeug.routing import Map, Rule
from werkzeug.exceptions import HTTPException, InternalServerError, NotFound from werkzeug.exceptions import HTTPException, InternalServerError, NotFound
from flask.helpers import _PackageBoundObject, url_for, get_flashed_messages, \ from .helpers import _PackageBoundObject, url_for, get_flashed_messages, \
_tojson_filter _tojson_filter
from flask.wrappers import Request, Response from .wrappers import Request, Response
from flask.config import ConfigAttribute, Config from .config import ConfigAttribute, Config
from flask.ctx import _RequestContext from .ctx import _RequestContext
from flask.globals import _request_ctx_stack, request from .globals import _request_ctx_stack, request
from flask.session import Session, _NullSession from .session import Session, _NullSession
from flask.module import _ModuleSetupState from .module import _ModuleSetupState
from flask.templating import _DispatchingJinjaLoader, \ from .templating import _DispatchingJinjaLoader, \
_default_template_ctx_processor _default_template_ctx_processor
# a lock used for logger initialization # a lock used for logger initialization

4
flask/ctx.py

@ -11,8 +11,8 @@
from werkzeug.exceptions import HTTPException from werkzeug.exceptions import HTTPException
from flask.globals import _request_ctx_stack from .globals import _request_ctx_stack
from flask.session import _NullSession from .session import _NullSession
class _RequestGlobals(object): class _RequestGlobals(object):

4
flask/helpers.py

@ -31,8 +31,8 @@ from werkzeug import Headers, wrap_file, is_resource_modified, cached_property
from jinja2 import FileSystemLoader from jinja2 import FileSystemLoader
from flask.globals import session, _request_ctx_stack, current_app, request from .globals import session, _request_ctx_stack, current_app, request
from flask.wrappers import Response from .wrappers import Response
def _assert_have_json(): def _assert_have_json():

2
flask/templating.py

@ -10,7 +10,7 @@
""" """
from jinja2 import BaseLoader, FileSystemLoader, TemplateNotFound from jinja2 import BaseLoader, FileSystemLoader, TemplateNotFound
from flask.globals import _request_ctx_stack from .globals import _request_ctx_stack
def _default_template_ctx_processor(): def _default_template_ctx_processor():

2
flask/wrappers.py

@ -12,7 +12,7 @@
from werkzeug import Request as RequestBase, Response as ResponseBase, \ from werkzeug import Request as RequestBase, Response as ResponseBase, \
cached_property cached_property
from helpers import json from .helpers import json
class Request(RequestBase): class Request(RequestBase):

Loading…
Cancel
Save