← Back
Editing: defaults.cpython-311.pyc
� �|�e; � �� � d dl mZ d dlmZmZmZmZ d dlmZm Z m Z mZ d dlm Z dZdZdZdZd Ze efd �� � Ze efd�� � Ze efd�� � Ze efd �� � 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 � � |j j } |j d }t |t � � r|}n# t t f$ r Y nw xY wt | j � � |d�} t j |� � }|� || � � }d}nl# t $ r_ |t k r� t � � � t ddd�z � � }|� t# |� � � � }d}Y nw xY wt% ||�� � S ) 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� exceptionNz Not Foundz4The requested resource was not found on this server.��title�details� text/html��content_type)� __class__�__name__�args� isinstance�str�AttributeError� IndexErrorr �pathr �get_template�renderr �ERROR_404_TEMPLATE_NAMEr �from_string�ERROR_PAGE_TEMPLATEr r ) �requestr � template_name�exception_repr�message�context�template�bodyr s �7/usr/lib/python3/dist-packages/django/views/defaults.py�page_not_foundr+ sD � � �(�1�N�%��.��#�� �g�s�#�#� %�$�N��� �J�'� � � ��� ���� �g�l�+�+�#�� �G�#��&�}�5�5�����w��0�0������� #� #� #��3�3�3�� �8�8�'�'��$�Q�#� #� � � �� ���w�w�/�/�0�0��"���� #���� ��<�@�@�@�@s"