ó
®ā0_c           @   s   d  d l  m Z d   Z d S(   i’’’’(   t   sixc         C   sŗ   y t  |  t  r |  } nT t  |  t j  rW |  j d  \ } } | | j   f } n |  j j |  j j f } t	 |  d k s t
  | SWn' t t
 f k
 rµ t d |    n Xd S(   sė   
    Takes a model or a string of the form "app_label.ModelName" and returns a
    corresponding ("app_label", "modelname") tuple. If a tuple is passed in,
    it's assumed to be a valid model tuple already and returned unchanged.
    t   .i   s`   Invalid model reference '%s'. String model references must be of the form 'app_label.ModelName'.N(   t
   isinstancet   tupleR    t   string_typest   splitt   lowert   _metat	   app_labelt
   model_namet   lent   AssertionErrort
   ValueError(   t   modelt   model_tupleR   R	   (    (    s8   /tmp/pip-unpacked-wheel-BAJOf3/django/db/models/utils.pyt   make_model_tuple   s    	N(   t   django.utilsR    R   (    (    (    s8   /tmp/pip-unpacked-wheel-BAJOf3/django/db/models/utils.pyt   <module>   s   