https://t.me/AnonymousX5
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/flask/views.pyc
�
-/�_c	@s�dZddlmZddlmZedddddd	d
dg�Zdefd
��YZde	fd��YZ
dee
e�fd��YZdS(s�
    flask.views
    ~~~~~~~~~~~

    This module provides class-based views inspired by the ones in Django.

    :copyright: 2010 Pallets
    :license: BSD-3-Clause
i(twith_metaclass(trequesttgettposttheadtoptionstdeletetputttracetpatchtViewcBs8eZdZdZdZdZd�Zed��Z	RS(s�Alternative way to use view functions.  A subclass has to implement
    :meth:`dispatch_request` which is called with the view arguments from
    the URL routing system.  If :attr:`methods` is provided the methods
    do not have to be passed to the :meth:`~flask.Flask.add_url_rule`
    method explicitly::

        class MyView(View):
            methods = ['GET']

            def dispatch_request(self, name):
                return 'Hello %s!' % name

        app.add_url_rule('/hello/<name>', view_func=MyView.as_view('myview'))

    When you want to decorate a pluggable view you will have to either do that
    when the view function is created (by wrapping the return value of
    :meth:`as_view`) or you can use the :attr:`decorators` attribute::

        class SecretView(View):
            methods = ['GET']
            decorators = [superuser_required]

            def dispatch_request(self):
                ...

    The decorators stored in the decorators list are applied one after another
    when the view function is created.  Note that you can *not* use the class
    based decorators since those would decorate the view class and not the
    generated view function!
    cCs
t��dS(s�Subclasses have to override this method to implement the
        actual view function code.  This method is called with all
        the arguments from the URL rule.
        N(tNotImplementedError(tself((s,/tmp/pip-install-sTXtzD/flask/flask/views.pytdispatch_requestEscs����fd��|jrV|�_|j�_x |jD]}|���q=Wn|�_|�_|j�_|j�_|j�_|j�_�S(s�Converts the class into an actual view function that can be used
        with the routing system.  Internally this generates a function on the
        fly which will instantiate the :class:`View` on each request and call
        the :meth:`dispatch_request` method on it.

        The arguments passed to :meth:`as_view` are forwarded to the
        constructor of the class.
        cs"�j���}|j||�S(N(t
view_classR
(targstkwargsR(t
class_argstclass_kwargstview(s,/tmp/pip-install-sTXtzD/flask/flask/views.pyRWs(t
decoratorst__name__t
__module__Rt__doc__tmethodstprovide_automatic_options(tclstnameRRt	decorator((RRRs,/tmp/pip-install-sTXtzD/flask/flask/views.pytas_viewLs				N((
RRRtNoneRRRR
tclassmethodR(((s,/tmp/pip-install-sTXtzD/flask/flask/views.pyR
s	tMethodViewTypecBseZdZd�ZRS(sYMetaclass for :class:`MethodView` that determines what methods the view
    defines.
    cCs�tt|�j|||�d|kr�t�}x3|D]+}t|dd�r8|j|j�q8q8Wx3tD]+}t	||�rn|j
|j��qnqnW|r�||_q�ndS(NR(tsuperR t__init__tsettgetattrRtupdateRthttp_method_funcsthasattrtaddtupper(RRtbasestdRtbasetkey((s,/tmp/pip-install-sTXtzD/flask/flask/views.pyR"ts	

(RRRR"(((s,/tmp/pip-install-sTXtzD/flask/flask/views.pyR ost
MethodViewcBseZdZd�ZRS(sA class-based view that dispatches request methods to the corresponding
    class methods. For example, if you implement a ``get`` method, it will be
    used to handle ``GET`` requests. ::

        class CounterAPI(MethodView):
            def get(self):
                return session.get('counter', 0)

            def post(self):
                session['counter'] = session.get('counter', 0) + 1
                return 'OK'

        app.add_url_rule('/counter', view_func=CounterAPI.as_view('counter'))
    cOswt|tjj�d�}|dkrKtjdkrKt|dd�}n|dk	sjtdtj��|||�S(NtHEADRsUnimplemented method %r(R$RtmethodtlowerRtAssertionError(RRRtmeth((s,/tmp/pip-install-sTXtzD/flask/flask/views.pyR
�s
(RRRR
(((s,/tmp/pip-install-sTXtzD/flask/flask/views.pyR.�sN(Rt_compatRtglobalsRt	frozensetR&tobjectR
ttypeR R.(((s,/tmp/pip-install-sTXtzD/flask/flask/views.pyt<module>
s![

https://t.me/AnonymousX5 - 2025