
 X	                 @   s  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
 e d d g  Z Gd	 d
   d
 e  Z e d d d d g d d  Z e d d g d d  Z e d d d d d g d d  Z e d d d d d d g d d  Z e d d d g d d  Z e d d d g d d  Z e d d d d d d d g d d  Z e d d d d d d d g  Z e d d d d d d d g  Z d S)    N)partial)make_model_tuple)Signal)six)RemovedInDjango20WarningZproviding_argsclassc                   sa   e  Z d  Z d Z d d   Z d d d d   f d d  Z d d d d d   f d d	  Z   S)
ModelSignalzz
    Signal subclass that allows the sender to be lazily specified as a string
    of the `app_label.ModelName` form.
    c             K   sj   d d l  m } t | | |  } t | t j  r\ | p@ | j } | j | t |   n
 | |  Sd  S)Nr   )Options)	Zdjango.db.models.optionsr	   r   
isinstancer   string_typesZdefault_appsZlazy_model_operationr   )selfmethodappsreceiversenderkwargsr	   Zpartial_method r   F/home/ubuntu/projects/ifolica/build/django/django/db/models/signals.py_lazy_method   s    zModelSignal._lazy_methodNTc          	      s2   |  j  t t |   j | | | d | d | d  S)Nweakdispatch_uid)r   superr   connect)r   r   r   r   r   r   )	__class__r   r   r      s    zModelSignal.connectc                sM   | d  k	 r% t  j d t d d n  |  j t t |   j | | | d | S)Nz+Passing `weak` to disconnect has no effect.
stacklevel   r   )warningswarnr   r   r   r   
disconnect)r   r   r   r   r   r   )r   r   r   r   #   s    zModelSignal.disconnect)__name__
__module____qualname____doc__r   r   r   r   r   )r   r   r      s   r   instanceargsr   Zuse_cachingTrawZusingZupdate_fieldscreatedactionreversemodelZpk_setZ
app_config	verbosityinteractiver   Zplan)r   	functoolsr   Zdjango.db.models.utilsr   Zdjango.dispatchr   Zdjango.utilsr   Zdjango.utils.deprecationr   Zclass_preparedr   Zpre_initZ	post_initZpre_saveZ	post_saveZ
pre_deleteZpost_deleteZm2m_changedZpre_migrateZpost_migrater   r   r   r   <module>   s&   	$	!