diff options
| author | Chris McDonough <chrism@plope.com> | 2010-12-07 19:14:22 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2010-12-07 19:14:22 -0500 |
| commit | 0523f01333a36bd87be9edb5aab21e3157adc9f3 (patch) | |
| tree | 2c10d5fe98c36fa24c29819581f755da88196fe9 | |
| parent | 84a58a9fec53e9b7fca604a413001a13065ee2d6 (diff) | |
| download | pyramid-0523f01333a36bd87be9edb5aab21e3157adc9f3.tar.gz pyramid-0523f01333a36bd87be9edb5aab21e3157adc9f3.tar.bz2 pyramid-0523f01333a36bd87be9edb5aab21e3157adc9f3.zip | |
use with_context in .include, also remove bogus sort of filenames
| -rw-r--r-- | pyramid/configuration.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pyramid/configuration.py b/pyramid/configuration.py index 60c0220f8..edba82c09 100644 --- a/pyramid/configuration.py +++ b/pyramid/configuration.py @@ -69,6 +69,7 @@ from pyramid.log import make_stream_logger from pyramid.mako_templating import renderer_factory as mako_renderer_factory from pyramid.path import caller_package from pyramid.path import package_path +from pyramid.path import package_of from pyramid.registry import Registry from pyramid.renderers import RendererHelper from pyramid.request import route_request_iface @@ -746,15 +747,14 @@ class Configurator(object): module = inspect.getmodule(func) sourcefiles.append((sourcefile, func, module)) - sourcefiles.sort() - _context = self._ctx for filename, func, module in sourcefiles: context = GroupingContextDecorator(_context) context.basepath = os.path.dirname(filename) context.includepath = _context.includepath + (filename,) - func(self.with_package(module, _ctx=context)) + context.package = package_of(module) + func(Configurator.with_context(context)) def add_handler(self, route_name, pattern, handler, action=None, **kw): |
