+
    üÐ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ÜØô ÜÜ—	’	Ü—I’IœdŸjšj¨D¯J©J¨<°s¸4¿;¹;¸-Ð)HÓIÓJÜ—I’IœdŸgšg d§k¡kÓ2´D·F²F¸4¿<¹<Ó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   € ô( �d 6Ó*Ð*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   € ô ”d—n‘n eÓ5Ð5r   c                ó<   € V ^8„  d   QhR\         R\         R\        /# rD   rF   )r   s   "r   r   r   x   s$   € ÷ 6ñ 6Üð6Ü03ð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   € ô ”d—n‘n eÓ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   