| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3/dist-packages/django/db/migrations/__pycache__/ |
Upload File : |
�
�|�ekb � �, � d dl Z d dlmZ d dlmZ d dlmZmZ d dl m
Z
d dlmZ d dl
mZ d dlmZmZ d d lmZ d d
lmZ d dlmZ d dlmZ d
dlmZ dd�Zd� Zd� Zd� Z G d� d� � Z G d� de� � Z! G d� de� � Z" G d� d� � Z#dS )� N)�contextmanager)� AppConfig)�Apps�apps)�settings)�models)�RECURSIVE_RELATIONSHIP_CONSTANT)�
DEFAULT_NAMES�normalize_together)�make_model_tuple)�cached_property)�
import_string)�get_docs_version� )�InvalidBasesError� c �� � t | t � � rB| � dd� � }t |� � dk rt |� � n ||d fS | j j | j j fS )N�.r � r )�
isinstance�str�split�len�tuple�_meta� app_label�
model_name)�modelr r s �</usr/lib/python3/dist-packages/django/db/migrations/state.py�_get_app_label_and_model_namer sc � ��%���� =����C��#�#��"�5�z�z�Q���u�U�|�|�|�Y��a��4I�I��{�$�e�k�&<�<�<� c � � d� | � � � D � � }t � � }| j � dd�� � D ]^}|j rU|j �Nt
|j t � � s4|� |j � � |�
|j � � �_| j }|j r| |v r|�
|j � � |S )zEReturn all models that have a direct relationship to the given model.c �F � g | ]}t |t j � � �|��S � )�
issubclassr �Model)�.0�subclasss r �
<listcomp>z'_get_related_models.<locals>.<listcomp> s: � � � � ���h���-�-���� � r! T)�include_parents�include_hidden)
�__subclasses__�setr �
get_fields�is_relation�
related_modelr r �addr �append�proxy�concrete_model)�m�related_models�related_fields_models�f�optss r �_get_related_modelsr: s� � �� �!"�!1�!1�!3�!3�� � �N� �E�E��
�W�
�
��T�
�
J�
J� 3� 3���=� 3�Q�_�8��A�O�]`�Aa�Aa�8�!�%�%�a�g�.�.�.��!�!�!�/�2�2�2��
�7�D��z� 3�a�0�0�0����d�1�2�2�2��r! c �4 � d� t | � � D � � S )zq
Return a list of typical (app_label, model_name) tuples for all related
models for the given model.
c �>