https://t.me/RX1948
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/migrations/operations/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/django/db/migrations/operations/__pycache__/utils.cpython-310.pyc
o

3�a��@sPddlmZddlmZddd�Zedd�Z		ddd	�Zddd�Zd
d�ZdS)�)�
namedtuple)�RECURSIVE_RELATIONSHIP_CONSTANTNcCs�t|t�r9|tkr|dus|durtd��||fSd|vr+|�dd�\}}||��fS|dur3td��||��fS|jj|jjfS)z�
    Turn a model class or model reference string and return a model tuple.

    app_label and model_name are used to resolve the scope of recursive and
    unscoped model relationship.
    NzMapp_label and model_name must be provided to resolve recursive relationships.�.�zCapp_label must be provided to resolve unscoped model relationships.)	�
isinstance�strr�	TypeError�split�lower�_meta�	app_label�
model_name)�modelrr
�r�G/usr/lib/python3/dist-packages/django/db/migrations/operations/utils.py�resolve_relations 
��r�FieldReferencez
to throughcCs�|j}|sdSd}d}t|jg|�R�|kr7t|dd�}|dus3|dus3d|vr/|dus3|js3||vr7||f}t|dd�}	|	r\t|	g|�R�|kr\|j}
|dusX|
dusX||
vr\||
f}|sb|sbdSt||�S)at
    Return either False or a FieldReference if `field` references provided
    context.

    False positives can be returned if `reference_field_name` is provided
    without `reference_field` because of the introspection limitation it
    incurs. This should not be an issue when this function is used to determine
    whether or not an optimization can take place.
    FN�	to_fields�through)�remote_fieldrr�getattr�primary_key�through_fieldsr)�model_tuple�field�reference_model_tuple�reference_field_name�reference_fieldr�
references_to�references_throughrrrrrr�field_references$s,
r rccsT�|j��D]!\}}|j��D]\}}t|||g|�R�}|r&||||fVqqdS)z�
    Generator of (model_state, name, field, reference) referencing
    provided context.

    If field_tuple is provided only references to this particular field of
    model_tuple will be generated.
    N)�models�items�fieldsr )�stater�field_tuple�state_model_tuple�model_state�namer�	referencerrr�get_referencesUs����r*cCstt|||�d�duS)z?Return whether `field_tuple` is referenced by any state models.N)�nextr*)r$rr%rrr�field_is_referenceddsr,)NN)r)	�collectionsr�django.db.models.fields.relatedrrrr r*r,rrrr�<module>s


�
1

https://t.me/RX1948 - 2025