HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberCP/lib/python3.10/site-packages/django/views/__pycache__/defaults.cpython-310.pyc
o

�hK�@s�ddlmZddlmZmZmZmZddlmZm	Z	m
Z
mZddlm
Z
dZdZdZdZd	Ze
efd
d��Ze
efdd
��Ze
efdd��Ze
efdd��ZdS)�)�quote)�HttpResponseBadRequest�HttpResponseForbidden�HttpResponseNotFound�HttpResponseServerError)�Context�Engine�TemplateDoesNotExist�loader)�requires_csrf_tokenz404.htmlz403.htmlz400.htmlz500.htmlz�
<!doctype html>
<html lang="en">
<head>
  <title>%(title)s</title>
</head>
<body>
  <h1>%(title)s</h1><p>%(details)s</p>
</body>
</html>
c	Cs�|jj}z|jd}WnttfyYnwt|t�r|}t|j�|d�}zt	�
|�}|�||�}Wt|�StyY|t
krB�t��tddd��}|�t|��}Yt|�Sw)a�
    Default 404 handler.

    Templates: :template:`404.html`
    Context:
        request_path
            The path of the requested URL (e.g., '/app/pages/bad_page/'). It's
            quoted to prevent a content injection attack.
        exception
            The message from the exception which triggered the 404 (if one was
            supplied), or the exception class name
    r)�request_path�	exceptionz	Not Foundz4The requested resource was not found on this server.��title�details)�	__class__�__name__�args�AttributeError�
IndexError�
isinstance�strr�pathr
�get_template�renderr	�ERROR_404_TEMPLATE_NAMEr�from_string�ERROR_PAGE_TEMPLATErr)�requestr
�
template_name�exception_repr�message�context�template�body�r%�H/usr/local/CyberCP/lib/python3.10/site-packages/django/views/defaults.py�page_not_found"s8�
�
�����r'cCsJzt�|�}Wnty|tkr�ttddd��YSwt|���S)zS
    500 error handler.

    Templates: :template:`500.html`
    Context: None
    zServer Error (500)�r)r
rr	�ERROR_500_TEMPLATE_NAMErrr)rrr#r%r%r&�server_errorRs��r*cCsJzt�|�}Wnty|tkr�ttddd��YSwt|���S)zS
    400 error handler.

    Templates: :template:`400.html`
    Context: None
    zBad Request (400)r(r)r
rr	�ERROR_400_TEMPLATE_NAMErrr�rr
rr#r%r%r&�bad_requestfs��	r-cCsXzt�|�}Wnty|tkr�ttddd��YSwt|j|dt|�id��S)ah
    Permission denied (403) handler.

    Templates: :template:`403.html`
    Context:
        exception
            The message from the exception which triggered the 403 (if one was
            supplied).

    If the template does not exist, an Http403 response containing the text
    "403 Forbidden" (as per RFC 9110 Section 15.5.4) will be returned.
    z
403 Forbiddenr(rr
)rr")r
rr	�ERROR_403_TEMPLATE_NAMErrrrr,r%r%r&�permission_denied|s���r/N)�urllib.parser�django.httprrrr�django.templaterrr	r
�django.views.decorators.csrfrrr.r+r)rr'r*r-r/r%r%r%r&�<module>s"/