<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
ó
¿öYc           @@  sç   d  Z  d d l m Z d d l Z d d l Z d d l m Z d d l m Z y d d l	 m
 Z
 Wn e k
 r{ e Z
 n Xd „  Z d e
 f d	 „  ƒ  YZ d
 e
 f d „  ƒ  YZ d e
 f d „  ƒ  YZ e Z d e
 f d „  ƒ  YZ d S(   sÃ   
raven.contrib.django.middleware
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
i    (   t   absolute_importN(   t   settings(   t   request_finished(   t   MiddlewareMixinc         @  s&   t  ‡  f d †  t t d d ƒ Dƒ ƒ S(   sV   
    Returns True if a 404 at the given URL *shouldn't* notify the site managers.
    c         3@  s   |  ] } | j  ˆ  ƒ Vq d  S(   N(   t   search(   t   .0t   pattern(   t   uri(    sY   /opt/alt/python27/lib/python2.7/site-packages/raven/contrib/django/middleware/__init__.pys	   <genexpr>   s   t   IGNORABLE_404_URLS(    (   t   anyt   getattrR   (   R   (    (   R   sY   /opt/alt/python27/lib/python2.7/site-packages/raven/contrib/django/middleware/__init__.pyt   is_ignorable_404   s    t   Sentry404CatchMiddlewarec           B@  s   e  Z d  „  Z RS(   c         C@  sØ   | j  d k r | St | j ƒ  ƒ r) | Sd d l m } | j ƒ  sI | S| j | ƒ } | j i t j	 d 6d d 6ƒ | j
 d d | j ƒ  d	 | ƒ } | s¢ d  Si | j d
 | j j ƒ d 6| j | ƒ d 6| _ | S(   Ni”  i    (   t   clientt   levelt   http404t   loggert   messages   Page Not Found: %st   datat   projectt
   project_idt   id(   t   status_codeR   t   get_full_patht   raven.contrib.django.modelsR   t
   is_enabledt   get_data_from_requestt   updatet   loggingt   INFOt   captureMessaget   build_absolute_urit   gett   remoteR   t	   get_identt   sentry(   t   selft   requestt   responseR   R   t   result(    (    sY   /opt/alt/python27/lib/python2.7/site-packages/raven/contrib/django/middleware/__init__.pyt   process_response%   s$    	
"(   t   __name__t
   __module__R(   (    (    (    sY   /opt/alt/python27/lib/python2.7/site-packages/raven/contrib/django/middleware/__init__.pyR   $   s   t   SentryResponseErrorIdMiddlewarec           B@  s   e  Z d  Z d „  Z RS(   sl   
    Appends the X-Sentry-ID response header for referencing a message within
    the Sentry datastore.
    c         C@  s+   t  | d d  ƒ s | S| j d | d <| S(   NR#   R   s   X-Sentry-ID(   R
   t   NoneR#   (   R$   R%   R&   (    (    sY   /opt/alt/python27/lib/python2.7/site-packages/raven/contrib/django/middleware/__init__.pyR(   I   s    (   R)   R*   t   __doc__R(   (    (    (    sY   /opt/alt/python27/lib/python2.7/site-packages/raven/contrib/django/middleware/__init__.pyR+   C   s   t   SentryMiddlewarec           B@  s/   e  Z e j ƒ  Z d  „  Z d „  Z d „  Z RS(   c         C@  s/   d  |  _ | t j _ t j |  j d t ƒd  S(   Nt   weak(   R,   t   _txidR.   t   threadR%   R   t   connectt   False(   R$   R%   (    (    sY   /opt/alt/python27/lib/python2.7/site-packages/raven/contrib/django/middleware/__init__.pyt   process_requestS   s    	c         C@  so   d d l  m } y" | j j | j | ƒ ƒ |  _ Wn6 t k
 rj } | j j t	 | ƒ d i | d 6ƒn Xd  S(   Ni    (   R   t   extraR%   (   R   R   t   transactiont   pusht   get_transaction_from_requestR0   t	   Exceptiont   error_loggert	   exceptiont   reprR,   (   R$   R%   t   funct   argst   kwargsR   t   exc(    (    sY   /opt/alt/python27/lib/python2.7/site-packages/raven/contrib/django/middleware/__init__.pyt   process_view`   s    	'c         K@  sa   d d l  m } t |  d d  ƒ rA | j j |  j ƒ d  |  _ n  d  t j _	 t
 j |  j
 ƒ d  S(   Ni    (   R   R0   (   R   R   R
   R,   R6   t   popR0   R.   R1   R%   R   t
   disconnect(   R$   R?   R   (    (    sY   /opt/alt/python27/lib/python2.7/site-packages/raven/contrib/django/middleware/__init__.pyR   l   s    (   R)   R*   t	   threadingt   localR1   R4   RA   R   (    (    (    sY   /opt/alt/python27/lib/python2.7/site-packages/raven/contrib/django/middleware/__init__.pyR.   P   s   		t#   DjangoRestFrameworkCompatMiddlewarec           B@  s   e  Z d Z d „  Z RS(   s!   application/x-www-form-urlencodeds   multipart/form-datas   application/octet-streamc         C@  sD   | j  j d d ƒ } x! |  j D] } | | k r d Sq W| j d S(   s~   
        Access request.body, otherwise it might not be accessible later
        after request has been read/streamed
        t   CONTENT_TYPEt    N(   t   METAR    t   non_cacheable_typest   body(   R$   R%   t   content_typet   non_cacheable_type(    (    sY   /opt/alt/python27/lib/python2.7/site-packages/raven/contrib/django/middleware/__init__.pyR4   ƒ   s
    (   s!   application/x-www-form-urlencodeds   multipart/form-datas   application/octet-stream(   R)   R*   RJ   R4   (    (    (    sY   /opt/alt/python27/lib/python2.7/site-packages/raven/contrib/django/middleware/__init__.pyRF   {   s     (   R-   t
   __future__R    R   RD   t   django.confR   t   django.core.signalsR   t   django.utils.deprecationR   t   ImportErrort   objectR   R   R+   R.   t   SentryLogMiddlewareRF   (    (    (    sY   /opt/alt/python27/lib/python2.7/site-packages/raven/contrib/django/middleware/__init__.pyt   <module>   s   
	
(