Ñò
ãŸIc @ sî d Z d d k Z d d k Z d d k Z d d k l Z d d k l Z l Z d d k
Z
d d k Z
d d k Z
d d k
l Z l Z d d k l Z d d k l Z l Z l Z l Z d g Z e i e ƒ Z d e f d „ ƒ YZ d S(
så WSGI App Creator
This module is responsible for creating the basic Pylons WSGI
application (PylonsApp). It's generally assumed that it will be called
by Paste, though any WSGI server could create and call the WSGI app as
well.
iÿÿÿÿN( t request_config( t HTTPFoundt HTTPNotFound( t Requestt Response( t _get_translator( t AttribSafeContextObjt
ContextObjt
PylonsContextt class_name_from_module_namet PylonsAppc B sV e Z d Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z
RS( sã Pylons WSGI Application
This basic WSGI app is provided should a web developer want to
get access to the most basic Pylons web application environment
available. By itself, this Pylons web application does little more
than dispatch to a controller and setup the context object, the
request object, and the globals object.
Additional functionality like sessions, and caching can be setup by
altering the ``environ['pylons.environ_config']`` setting to
indicate what key the ``session`` and ``cache`` functionality
should come from.
Resolving the URL and dispatching can be customized by sub-classing
or "monkey-patching" this class. Subclassing is the preferred
approach.
c
K s– t i i ƒ | _ } | d } | d | _ | i d ƒ p | d | _ | d | _ | | _ | d | _ | d | _ h | _
t | _ | i i
d d ƒ d „ } | | _ | i d
ƒ o˜ | d
d } t i i | d d
| d
| d | _ xf | d
d D]I } t i d | d ƒ | i i | d d
| d
d | d | d qWn
d | _ | i i d d ƒ | _ | i i d d ƒ | _ d S( sø Initialize a base Pylons WSGI application
The base Pylons WSGI application requires several keywords, the
package name, and the globals object. If no helpers object is
provided then h will be None.
s pylons.packages pylons.hs pylons.app_globalss pylons.gs pylons.environ_configs pylons.request_optionss pylons.response_optionst langc S s# t i d | ƒ t d | ƒ ‚ d S( Ns Raising redirect to %st location( t logt debugR ( t url( ( s2 /usr/lib/python2.6/site-packages/pylons/wsgiapp.pyt redirect_toD s s buffet.template_enginesi t enginet
template_roott template_optionsi s+ Initializing additional template engine: %st aliast sessions beaker.sessiont caches beaker.cacheN( t pylonst configt _current_objt helperst gett globalst environ_configt package_namet request_optionst response_optionst controller_classest Falset log_debugt
setdefaultt NoneR t
templatingt Buffett buffetR
R t preparet _session_keyt
_cache_key( t selft kwargsR R R t def_engt e( ( s2 /usr/lib/python2.6/site-packages/pylons/wsgiapp.pyt __init__/ s:
c C sn t i t i ƒ j } | _ | i | | ƒ d | j o` | i | ƒ | d d j o> t i i i
| ƒ | d d g ƒ d t i i i | ƒ g Sn | i | | ƒ } | i
| | | ƒ } d | j o" t | d ƒ o | | d d