
¾«‘_e  ã               @   sÇ   d  Z  d d l m Z d d l m Z d d l m Z d Z d Z d d „  Z d	 d
 „  Z	 d d „  Z
 e ƒ  Z e ƒ  Z e e
 ƒ Z e e e d ƒ ƒ Z e e e d ƒ ƒ Z e e e	 d ƒ ƒ Z d S)z¶
    flask.globals
    ~~~~~~~~~~~~~

    Defines all the global objects that are proxies to the current
    active context.

    :copyright: 2010 Pallets
    :license: BSD-3-Clause
é    )Úpartial)Ú
LocalProxy)Ú
LocalStackzÜWorking outside of request context.

This typically means that you attempted to use functionality that needed
an active HTTP request.  Consult the documentation on testing for
information about how to avoid this problem.a!  Working outside of application context.

This typically means that you attempted to use functionality that needed
to interface with the current application object in some way. To solve
this, set up an application context with app.app_context().  See the
documentation for more information.c             C   s.   t  j } | d  k r! t t ƒ ‚ t | |  ƒ S)N)Ú_request_ctx_stackÚtopÚRuntimeErrorÚ_request_ctx_err_msgÚgetattr)Únamer   © r   ú./tmp/pip-build-5gj8f0j9/flask/flask/globals.pyÚ_lookup_req_object#   s    	r   c             C   s.   t  j } | d  k r! t t ƒ ‚ t | |  ƒ S)N)Ú_app_ctx_stackr   r   Ú_app_ctx_err_msgr	   )r
   r   r   r   r   Ú_lookup_app_object*   s    	r   c              C   s(   t  j }  |  d  k r! t t ƒ ‚ |  j S)N)r   r   r   r   Zapp)r   r   r   r   Ú	_find_app1   s    	r   ÚrequestÚsessionÚgN)Ú__doc__Ú	functoolsr   Zwerkzeug.localr   r   r   r   r   r   r   r   r   Zcurrent_appr   r   r   r   r   r   r   Ú<module>   s   			