관리-도구
편집 파일: templates.cpython-38.opt-1.pyc
U ��\� � @ sb d dl mZ zd dlmZ W n ek r< d dlm Z Y nX dd� Z dd� Zdd � Zd d� Z dS ) � )�TemplateSyntaxError)�Origin)�LoaderOriginc C sj t | d�rt| j�S t | d�r(t| j�S t| t�rft | d�rf| j}t|tt f�rft|d t �rft|�S d S )N�template_debug�django_template_source�sourcer )�hasattr�_get_template_frame_from_debugr �_get_template_frame_from_sourcer � isinstancer r �tuple�listr )� exc_valuer � r �Y/opt/alt/python38/lib/python3.8/site-packages/sentry_sdk/integrations/django/templates.py�!get_template_frame_from_exception s �r c C s� | d krd S | d }| d }|d kr(d}g }g }d }| d D ]4\}}||k rX|� |� q<||krl|� |� q<|}q<|||dd � |d d� |dd�S ) N�line�name�<django template>Zsource_lines���� T)�filename�lineno�pre_context�post_context�context_lineZin_app)�append)�debugr r r r r �ir r r r r '