î
ß^Q\ñ  ã               @   s   Gd  d „  d e  ƒ Z d S)c               @   s:   e  Z d  Z d Z d d „  Z d d „  Z d d „  Z d S)	ÚKeepContexta¤  
    Context manager that receives a `django.template.Context` instance and a list of keys

    Once the context manager is exited, it removes `keys` from the context, to avoid
    side effects in later layout objects that may use the same context variables.

    Layout objects should use `extra_context` to introduce context variables, never
    touch context object themselves, that could introduce side effects.
    c             C   s   | |  _  | |  _ d  S)N)ÚcontextÚkeys)Úselfr   r   © r   úD/var/www/dbchiro/venv/build/django-crispy-forms/crispy_forms/base.pyÚ__init__   s    	zKeepContext.__init__c             C   s   d  S)Nr   )r   r   r   r   Ú	__enter__   s    zKeepContext.__enter__c             C   s:   x3 t  |  j ƒ D]" } | |  j k r |  j | =q q Wd  S)N)Úlistr   r   )r   ÚtypeÚvalueÚ	tracebackÚkeyr   r   r   Ú__exit__   s    zKeepContext.__exit__N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r   r      s   	r   N)Úobjectr   r   r   r   r   Ú<module>   s    