|
Server : Apache System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64 User : njnconst ( 1116) PHP Version : 8.4.18 Disable Function : NONE Directory : /lib64/python2.7/site-packages/flask/ |
Upload File : |
�
-/�_c @ s� d Z d d l Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m
Z
d d l m Z d
e
e f d � � YZ e d e e
f d
� � Y� Z d e
f d � � YZ d � Z d � Z d � Z d � Z d S( s�
flask.debughelpers
~~~~~~~~~~~~~~~~~~
Various helpers to make the development experience better.
:copyright: 2010 Pallets
:license: BSD-3-Clause
i����N( t warni ( t implements_to_string( t text_type( t Flask( t Blueprint( t _request_ctx_stackt UnexpectedUnicodeErrorc B s e Z d Z RS( sj Raised in places where we want some better error reporting for
unexpected unicode or binary data.
( t __name__t
__module__t __doc__( ( ( s3 /tmp/pip-install-sTXtzD/flask/flask/debughelpers.pyR s t DebugFilesKeyErrorc B s e Z d Z d � Z d � Z RS( s� Raised from request.files during debugging. The idea is that it can
provide a better error message than just a generic KeyError/BadRequest.
c C sk | j j | � } d | | j f g } | rU | j d d j d � | D� � � n d j | � | _ d S( Ns% You tried to access the file "%s" in the request.files dictionary but it does not exist. The mimetype for the request is "%s" instead of "multipart/form-data" which means that no file contents were transmitted. To fix this error you should provide enctype="multipart/form-data" in your form.sI
The browser instead transmitted some file names. This was submitted: %ss , c s s | ] } d | Vq d S( s "%s"N( ( t .0t x( ( s3 /tmp/pip-install-sTXtzD/flask/flask/debughelpers.pys <genexpr>. s t ( t formt getlistt mimetypet appendt joint msg( t selft requestt keyt form_matchest buf( ( s3 /tmp/pip-install-sTXtzD/flask/flask/debughelpers.pyt __init__! s c C s | j S( N( R ( R ( ( s3 /tmp/pip-install-sTXtzD/flask/flask/debughelpers.pyt __str__2 s ( R R R R R ( ( ( s3 /tmp/pip-install-sTXtzD/flask/flask/debughelpers.pyR
s t FormDataRoutingRedirectc B s e Z d Z d � Z RS( s� This exception is raised by Flask in debug mode if it detects a
redirect caused by the routing system when the request method is not
GET, HEAD or OPTIONS. Reasoning: form data will be dropped.
c C s� | j } d | j | j f g } | j d | j j d � d k rU | j d � n | j d | j � | j d � t j | d j | � j
d � � d S(
Nsj A request was sent to this URL (%s) but a redirect was issued automatically by the routing system to "%s".t /t ?i s� The URL was defined with a trailing slash so Flask will automatically redirect to the URL with the trailing slash if it was accessed without one.s� Make sure to directly send your %s-request to this URL since we can't make browsers or HTTP clients redirect with form data reliably or without user interaction.s3
Note: this exception is only raised in debug modeR
s utf-8( t routing_exceptiont urlt new_urlt base_urlt splitR t methodt AssertionErrorR R t encode( R R t excR ( ( s3 /tmp/pip-install-sTXtzD/flask/flask/debughelpers.pyR <