ó
mMJc           @   s?   d  Z  d d l m Z m Z d g Z d e f d „  ƒ  YZ d S(   s   Error controlleriÿÿÿÿ(   t   requestt   exposet   ErrorControllerc           B   s#   e  Z d  Z e d ƒ d „  ƒ Z RS(   sS  
    Generates error documents as and when they are required.

    The ErrorDocuments middleware forwards to ErrorController when error
    related status codes are returned from the application.

    This behaviour can be altered by changing the parameters to the
    ErrorDocuments middleware in your config/middleware.py file.
    
    s   monkey.templates.errorc      	   O   sg   t  j j d ƒ } d } t d t  j j d d ƒ d t  j j d | j ƒ d t  j j d | ƒ ƒ } | S(   s   Render the error documents   pylons.original_responses@   <p>We're sorry but we weren't able to process  this request.</p>t   prefixt   SCRIPT_NAMEt    t   codet   message(   R    t   environt   gett   dictt   paramst
   status_int(   t   selft   argst   kwargst   respt   default_messaget   values(    (    sX   /afs/athena.mit.edu/activity/s/sca/Scripts/turbogears/Monkey/monkey/controllers/error.pyt   document   s    (   t   __name__t
   __module__t   __doc__R   R   (    (    (    sX   /afs/athena.mit.edu/activity/s/sca/Scripts/turbogears/Monkey/monkey/controllers/error.pyR   	   s   
N(   R   t   tgR    R   t   __all__t   objectR   (    (    (    sX   /afs/athena.mit.edu/activity/s/sca/Scripts/turbogears/Monkey/monkey/controllers/error.pyt   <module>   s   	