Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/django/db/models/__pycache__/ |
Upload File : |
o �aL � @ s@ d dl Z d dlmZ dd� Zdd� Zdd� Ze �� d d � �ZdS )� N)� namedtuplec C s| z.t | t�r | }nt | t�r| �d�\}}||�� f}n| jj| jjf}t|�dks,J �|W S t t fy= t d| ��w )z� Take a model or a string of the form "app_label.ModelName" and return a corresponding ("app_label", "modelname") tuple. If a tuple is passed in, assume it's a valid model tuple already and return it unchanged. �.� z`Invalid model reference '%s'. String model references must be of the form 'app_label.ModelName'.)� isinstance�tuple�str�split�lower�_meta� app_label� model_name�len� ValueError�AssertionError)�model�model_tupler r � r �8/usr/lib/python3/dist-packages/django/db/models/utils.py�make_model_tuple s ���r c c s0 � | � � D ]\}}|t|�r|� n|fV qdS )zp Generate key/value pairs for the given mapping where the values are evaluated if they're callable. N)�items�callable)�mapping�k�vr r r �resolve_callables s ��r c C s t | � |� S �N)�create_namedtuple_class)�names�valuesr r r �unpickle_named_row% s r c s&