Mark  Ramm-Christensen avatar Mark Ramm-Christensen committed 2e37c77

Fixing helper import issues -- pylons.package does not exist, but 'package' does.

Comments (0)

Files changed (2)


         config['pylons.app_globals'] = self.package.lib.app_globals.Globals()
         g = config['pylons.app_globals']
         g.dotted_filename_finder = DottedFileNameFinder()
-        #config['pylons.helpers'] = self.package.lib.helpers
-        #config['pylons.h'] = self.package.lib.helpers
     def setup_sa_auth_backend(self):
         """This method adds sa_auth information to the config."""
     g = conf.get('pylons.app_globals') or conf['pylons.g']
-        h = config.get('pylons.package').lib.helpers
+        h = conf.package.lib.helpers
     except (AttributeError, KeyError):
         h = Bunch()
         predicates = predicates,
-    # TODO in 2.2: we should actually just get helpers from the package's helpers
-    # module and dump the use of the SOP.
-        helpers = config['pylons.package'].lib.helpers
+        h = config.package.lib.helpers
     except AttributeError, ImportError:
-        helpers = Bunch()
+        h = Bunch()
     root_vars = Bunch(
         c = tmpl_context,
         response = response,
         request = request,
         url = tg.url,
-        helpers = helpers,
+        helpers = h,
+        h = h,
         tg = tg_vars
     #Allow users to provide a callable that defines extra vars to be
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.