HEX
Server: LiteSpeed
System: Linux pl-rocket-da1.hostsila.org 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: etorby24eu (1588)
PHP: 8.3.23
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/lib/python2.7/site-packages/flask/views.pyc
�
n�Dac	@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-build-W6Gm0N/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-build-W6Gm0N/Flask/flask/views.pyRWs(t
decoratorst__name__t
__module__Rt__doc__tmethodstprovide_automatic_options(tclstnameRRt	decorator((RRRs*/tmp/pip-build-W6Gm0N/Flask/flask/views.pytas_viewLs				N((
RRRtNoneRRRR
tclassmethodR(((s*/tmp/pip-build-W6Gm0N/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-build-W6Gm0N/Flask/flask/views.pyR"ts	

(RRRR"(((s*/tmp/pip-build-W6Gm0N/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-build-W6Gm0N/Flask/flask/views.pyR
�s
(RRRR
(((s*/tmp/pip-build-W6Gm0N/Flask/flask/views.pyR.�sN(Rt_compatRtglobalsRt	frozensetR&tobjectR
ttypeR R.(((s*/tmp/pip-build-W6Gm0N/Flask/flask/views.pyt<module>
s![