+
    Dfj                         R t Rt^ RIHt ^ RIHt ^ RIHtHt ^ RI	H
t
Ht ^ RIHtHt  ! R R]4      tR R	 ltRR
 R lltRR R lltR# )z*
Utility implementations of L{IResource}.
)cast)http)IRenderableIRequest)	IResourceResource)renderElementtagsc                   f   a a ] tR t^t oRtV3R lV 3R lltV3R lR ltV3R lR ltRtVt	V ;t
# )	
_ErrorPagea  
L{_ErrorPage} is a resource that responds to all requests with a particular
(parameterized) HTTP status code and an HTML body containing some
descriptive text. This is useful for rendering simple error pages.

@see: L{twisted.web.pages.errorPage}

@ivar _code: An integer HTTP status code which will be used for the
    response.

@ivar _brief: A short string which will be included in the response body as
    the page title.

@ivar _detail: A longer string which will be included in the response body.
c                0   < V ^8  d   QhRS[ RS[RS[RR/# )   codebriefdetailreturnN)intstr)format__classdict__s   "3/usr/lib/python3/dist-packages/twisted/web/pages.py__annotate___ErrorPage.__annotate__(   s)     # #S # #c #d #    c                H   < \         SV `  4        Wn        W n        W0n        R # )N)super__init___code_brief_detail)selfr   r   r   	__class__s   &&&&r   r   _ErrorPage.__init__(   s    
 "r   c                &   < V ^8  d   QhRS[ RS[/# )r   requestr   )r   object)r   r   s   "r   r   r   .   s     
 
h 
6 
r   c                   VP                  V P                  4       VP                  RR4       \        V\	        \
        \        P                  ! \        P                  ! \        P                  ! V P                   RV P                   24      4      \        P                  ! \        P                  ! V P                  4      \        P                  ! V P                  4      4      4      4      4      # )zr
Respond to all requests with the given HTTP status code and an HTML
document containing the explanatory strings.
s   content-types   text/html; charset=utf-8z - )setResponseCoder   	setHeaderr   r   r   r	   htmlheadtitler   bodyh1pr   )r    r$   s   &&r   render_ErrorPage.render.   s    
 	

+/+FG 		IIdjjDJJ<s4;;-)HIJIIdggdkk2DFF4<<4HI
 	
r   c                ,   < V ^8  d   QhRS[ RS[RS[/# )r   pathr$   r   )bytesr   r   )r   r   s   "r   r   r   C   s"     	 	U 	X 	( 	r   c                    V # )z
Handle all requests for which L{_ErrorPage} lacks a child by returning
this error page.

@param path: A path segment.

@param request: HTTP request
 )r    r2   r$   s   &&&r   getChild_ErrorPage.getChildC   s	     r   )r   r   r   )__name__
__module____qualname____firstlineno____doc__r   r/   r6   __static_attributes____classdictcell____classcell__)r!   r   s   @@r   r   r      s-      # #
 
*	 	 	r   r   c                H    V ^8  d   QhR\         R\        R\        R\        /# )r   r   r   r   r   )r   r   r   )r   s   "r   r   r   O   s(     + +C + +S +Z +r   c                    \        WV4      # )aF  
Build a resource that responds to all requests with a particular HTTP
status code and an HTML body containing some descriptive text. This is
useful for rendering simple error pages.

The resource dynamically handles all paths below it. Use
L{IResource.putChild()} to override a specific path.

@param code: An integer HTTP status code which will be used for the
    response.

@param brief: A short string which will be included in the response
    body as the page title.

@param detail: A longer string which will be included in the
    response body.

@returns: An L{IResource}
)r   )r   r   r   s   &&&r   	errorPagerB   O   s    ( d6**r   c                <    V ^8  d   QhR\         R\         R\        /# r   r   messager   r   r   )r   s   "r   r   r   f   s&     6 666 6r   c                6    \        \        P                  W4      # )z
Generate an L{IResource} with a 404 Not Found status code.

@see: L{twisted.web.pages.errorPage}

@param brief: A short string displayed as the page title.

@param message: A longer string displayed in the page body.

@returns: An L{IResource}
)r   r   	NOT_FOUNDr   rE   s   &&r   notFoundrJ   f   s     dnne55r   c                <    V ^8  d   QhR\         R\         R\        /# rD   rF   )r   s   "r   r   r   x   s$     6 660366r   c                6    \        \        P                  W4      # )z
Generate an L{IResource} with a 403 Forbidden status code.

@see: L{twisted.web.pages.errorPage}

@param brief: A short string displayed as the page title.

@param message: A longer string displayed in the page body.

@returns: An L{IResource}
)r   r   	FORBIDDENrI   s   &&r   	forbiddenrN   x   s     dnne55r   N)rB   rJ   rN   )zNo Such Resourcez%Sorry. No luck finding that resource.)zForbidden ResourcezSorry, resource is forbidden.)r<   __all__typingr   twisted.webr   twisted.web.iwebr   r   twisted.web.resourcer   r   twisted.web.templater   r	   r   rB   rJ   rN   r5   r   r   <module>rU      sC   
   2 4 45 5p+.6$6 6r   