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 jinja2 import Markup, escape
from flask.app import Flask, Request, Response
from flask.config import Config
from flask.helpers import url_for, jsonify, json_available, flash, \
from .app import Flask, Request, Response
from .config import Config
from .helpers import url_for, jsonify, json_available, flash, \
send_file, get_flashed_messages, get_template_attribute
from flask.globals import current_app, g, request, session, _request_ctx_stack
from flask.module import Module
from flask.templating import render_template, render_template_string
from .globals import current_app, g, request, session, _request_ctx_stack
from .module import Module
from .templating import render_template, render_template_string
# only import json if it's 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.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
from flask.wrappers import Request, Response
from flask.config import ConfigAttribute, Config
from flask.ctx import _RequestContext
from flask.globals import _request_ctx_stack, request
from flask.session import Session, _NullSession
from flask.module import _ModuleSetupState
from flask.templating import _DispatchingJinjaLoader, \
from .wrappers import Request, Response
from .config import ConfigAttribute, Config
from .ctx import _RequestContext
from .globals import _request_ctx_stack, request
from .session import Session, _NullSession
from .module import _ModuleSetupState
from .templating import _DispatchingJinjaLoader, \
_default_template_ctx_processor
# a lock used for logger initialization

4
flask/ctx.py

@ -11,8 +11,8 @@
from werkzeug.exceptions import HTTPException
from flask.globals import _request_ctx_stack
from flask.session import _NullSession
from .globals import _request_ctx_stack
from .session import _NullSession
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 flask.globals import session, _request_ctx_stack, current_app, request
from flask.wrappers import Response
from .globals import session, _request_ctx_stack, current_app, request
from .wrappers import Response
def _assert_have_json():

2
flask/templating.py

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

2
flask/wrappers.py

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

Loading…
Cancel
Save