OwlCyberSecurity - MANAGER
Edit File: defaults.cpython-39.pyc
a ���eK � @ s� d dl mZ d dlmZmZmZmZ d dlmZm Z m Z mZ d dlm Z dZdZdZdZd Ze efd d��Ze efdd ��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 C s� |j j}z|jd }W n ttfy, Y n0 t|t�r<|}t| j�|d�}zt � |�}|�|| �}W n@ ty� |t kr~� t� �tddd� �}|�t|��}Y n0 t|�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� 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 Zfrom_string�ERROR_PAGE_TEMPLATEr r )�requestr � template_nameZexception_repr�message�context�template�body� r# �V/home/gouroczh/virtualenv/pat/3.9/lib/python3.9/site-packages/django/views/defaults.py�page_not_found"