diff options
author | Ryan Petrello <lists@ryanpetrello.com> | 2013-04-30 10:51:16 -0400 |
---|---|---|
committer | Ryan Petrello <lists@ryanpetrello.com> | 2013-04-30 10:51:16 -0400 |
commit | d34a71411360270f03b0f1d4ffcc6dffe9b8e00e (patch) | |
tree | df44d9f990d1694586d421b6fd049f47212e68eb | |
parent | 125495a899f984d7a33d7bacb56f3212314ef995 (diff) | |
download | pecan-d34a71411360270f03b0f1d4ffcc6dffe9b8e00e.tar.gz |
Correct relative imports.
-rw-r--r-- | pecan/__init__.py | 20 | ||||
-rw-r--r-- | pecan/commands/__init__.py | 8 | ||||
-rw-r--r-- | pecan/core.py | 10 | ||||
-rw-r--r-- | pecan/decorators.py | 3 | ||||
-rw-r--r-- | pecan/deploy.py | 2 | ||||
-rw-r--r-- | pecan/hooks.py | 4 | ||||
-rw-r--r-- | pecan/middleware/errordocument.py | 3 | ||||
-rw-r--r-- | pecan/rest.py | 8 | ||||
-rw-r--r-- | pecan/routing.py | 4 | ||||
-rw-r--r-- | pecan/secure.py | 4 | ||||
-rw-r--r-- | pecan/templating.py | 2 |
11 files changed, 35 insertions, 33 deletions
diff --git a/pecan/__init__.py b/pecan/__init__.py index 11db082..0a2e414 100644 --- a/pecan/__init__.py +++ b/pecan/__init__.py @@ -1,16 +1,16 @@ -from core import ( +from .core import ( abort, override_template, Pecan, load_app, redirect, render, request, response ) -from decorators import expose -from hooks import RequestViewerHook -from middleware.debug import DebugMiddleware -from middleware.errordocument import ErrorDocumentMiddleware -from middleware.recursive import RecursiveMiddleware -from middleware.static import StaticFileMiddleware - -from configuration import set_config, Config -from configuration import _runtime_conf as conf +from .decorators import expose +from .hooks import RequestViewerHook +from .middleware.debug import DebugMiddleware +from .middleware.errordocument import ErrorDocumentMiddleware +from .middleware.recursive import RecursiveMiddleware +from .middleware.static import StaticFileMiddleware + +from .configuration import set_config, Config +from .configuration import _runtime_conf as conf try: from logging.config import dictConfig as load_logging_config diff --git a/pecan/commands/__init__.py b/pecan/commands/__init__.py index db5aafe..da02464 100644 --- a/pecan/commands/__init__.py +++ b/pecan/commands/__init__.py @@ -1,4 +1,4 @@ -from base import CommandRunner, BaseCommand # noqa -from serve import ServeCommand # noqa -from shell import ShellCommand # noqa -from create import CreateCommand # noqa +from .base import CommandRunner, BaseCommand # noqa +from .serve import ServeCommand # noqa +from .shell import ShellCommand # noqa +from .create import CreateCommand # noqa diff --git a/pecan/core.py b/pecan/core.py index 46b160a..4f5ad8a 100644 --- a/pecan/core.py +++ b/pecan/core.py @@ -13,10 +13,10 @@ import operator from webob import Request, Response, exc, acceptparse -from templating import RendererFactory -from routing import lookup_controller, NonCanonicalPath -from util import _cfg, encode_if_needed -from middleware.recursive import ForwardRequestException +from .templating import RendererFactory +from .routing import lookup_controller, NonCanonicalPath +from .util import _cfg, encode_if_needed +from .middleware.recursive import ForwardRequestException # make sure that json is defined in mimetypes @@ -149,7 +149,7 @@ def load_app(config): returns a pecan.Pecan object ''' - from configuration import _runtime_conf, set_config + from .configuration import _runtime_conf, set_config set_config(config, overwrite=True) for package_name in getattr(_runtime_conf.app, 'modules', []): diff --git a/pecan/decorators.py b/pecan/decorators.py index be27df8..e5afb9f 100644 --- a/pecan/decorators.py +++ b/pecan/decorators.py @@ -1,5 +1,6 @@ from inspect import getargspec, getmembers, isclass, ismethod -from util import _cfg + +from .util import _cfg __all__ = [ 'expose', 'transactional', 'accept_noncanonical', 'after_commit', diff --git a/pecan/deploy.py b/pecan/deploy.py index 08019f9..be6b359 100644 --- a/pecan/deploy.py +++ b/pecan/deploy.py @@ -1,4 +1,4 @@ -from core import load_app +from .core import load_app def deploy(config): diff --git a/pecan/hooks.py b/pecan/hooks.py index f7422b8..94fdd1b 100644 --- a/pecan/hooks.py +++ b/pecan/hooks.py @@ -3,8 +3,8 @@ from inspect import getmembers from webob.exc import HTTPFound -from util import iscontroller, _cfg -from routing import lookup_controller +from .util import iscontroller, _cfg +from .routing import lookup_controller __all__ = [ 'PecanHook', 'TransactionHook', 'HookController', diff --git a/pecan/middleware/errordocument.py b/pecan/middleware/errordocument.py index a4a7021..4f8ac92 100644 --- a/pecan/middleware/errordocument.py +++ b/pecan/middleware/errordocument.py @@ -1,5 +1,6 @@ import sys -from recursive import ForwardRequestException, RecursionLoop + +from .recursive import ForwardRequestException, RecursionLoop class StatusPersist(object): diff --git a/pecan/rest.py b/pecan/rest.py index 08b5efb..7403abc 100644 --- a/pecan/rest.py +++ b/pecan/rest.py @@ -1,9 +1,9 @@ from inspect import getargspec, ismethod -from core import abort, request -from decorators import expose -from routing import lookup_controller -from util import iscontroller +from .core import abort, request +from .decorators import expose +from .routing import lookup_controller +from .util import iscontroller class RestController(object): diff --git a/pecan/routing.py b/pecan/routing.py index d38c22e..5063fbe 100644 --- a/pecan/routing.py +++ b/pecan/routing.py @@ -1,7 +1,7 @@ from webob import exc -from secure import handle_security, cross_boundary -from util import iscontroller +from .secure import handle_security, cross_boundary +from .util import iscontroller __all__ = ['lookup_controller', 'find_object'] diff --git a/pecan/secure.py b/pecan/secure.py index c6f29cf..e147427 100644 --- a/pecan/secure.py +++ b/pecan/secure.py @@ -2,8 +2,8 @@ from functools import wraps from inspect import getmembers, ismethod, isfunction from webob import exc -from decorators import expose -from util import _cfg, iscontroller +from .decorators import expose +from .util import _cfg, iscontroller __all__ = ['unlocked', 'secure', 'SecureController'] diff --git a/pecan/templating.py b/pecan/templating.py index 774cce0..4e03d6d 100644 --- a/pecan/templating.py +++ b/pecan/templating.py @@ -1,5 +1,5 @@ import cgi -from jsonify import encode +from .jsonify import encode _builtin_renderers = {} error_formatters = [] |