Home | History | Annotate | Download | only in paste

Lines Matching full:registry

4 """Registry for handling request-local module globals sanely
30 from paste.registry import RegistryManager, StackedObjectProxy
41 if environ.has_key('paste.registry'):
42 environ['paste.registry'].register(myglobal, obj)
46 registered with Registry.
278 class Registry(object):
281 The Registry object is instantiated a single time for the request no
294 """Create a new Registry object
296 ``prepare`` must still be called before this Registry object can be
303 """Used to create a new registry context
306 called on the existing Registry object. This sets up a new context
330 registry.multiregister([(sop, obj), (anothersop, anotherobj)])
347 were tracked at this Registry context"""
353 """Creates and maintains a Registry context
355 RegistryManager creates a new registry context for the registration of
363 RegistryManager instance, using the ``environ['paste.registry']``
364 object which is a Registry instance.
373 reg = environ.setdefault('paste.registry', Registry())
448 Registry state and enable automatic restoration on all currently registered
459 Registry/restorer).
461 The request's Registry objects' reglists are restored from the restorer
462 when a restoration context begins, enabling the Registry methods to work
484 """Save the state of this request's Registry (if it hasn't already been
487 registry = environ.get('paste.registry')
488 if not registry or not len(registry.reglist) or \
490 # No Registry, no state to save, or this request's state has
495 (registry, registry.reglist[:])
500 for reglist in registry.reglist:
535 (pushing/popping is only done at the Registry level) when a restoration
556 # Restore the old Registry object's state
557 registry, reglist = self.saved_registry_states[request_id]
558 registry.reglist = reglist