1. Mike Orr
  2. patch-pylons


Ben Bangert  committed 40cc516

Update configurator method docs.

  • Participants
  • Parent commits 642cfff
  • Branches trunk

Comments (0)

Files changed (3)

File pylons/configuration.py

View file
  • Ignore whitespace
         return result
     def add_helpers(self, module_ref):
-        """ Add a reference to the helpers module, or load the module
-        ref if its a dotted notation string."""
+        """ Add a reference to the helpers module
+        The ``module_ref`` argument should be either an actual
+        reference to the module object that should be used, or a
+        :term:`dotted name string` which will be imported and
+        assigned as the helpers module.
+        The helpers module is generally used with templates to provide
+        a common place to put additional functions needed within all
+        templates. Names present in the helpers module will be
+        available under the 'h' namespace in templates.
+        """
         if isinstance(module_ref, basestring):
             module_ref = resolve_dotted(module_ref)
         self.registry.helpers = module_ref

File pylons/docs/en/glossary.rst

View file
  • Ignore whitespace
             Pylons :ref:`deployment`
         .. _easy_install: http://peak.telecommunity.com/DevCenter/EasyInstall
+    dotted name string
+        A reference to a Python module by name using a string to identify it,
+        e.g. ``pylons.controllers.util``. These strings are evaluated to
+        import the module being referenced without having to import it in
+        the code used. This is generally used to avoid import-time 
+        side-effects.
         Python egg's are bundled Python packages, generally installed by
         a package called :term:`setuptools`. Unlike normal Python package

File tests/test_units/test_controller.py

View file
  • Ignore whitespace
         req.exception = True
         assert req.response_callbacks[0](req, resp) == None
         assert 'Set-Cookie' not in resp.headers
 def make_controllers():