OwlCyberSecurity - MANAGER
Edit File: registry.cpython-39.pyc
a ���e�D � @ st d dl Z d dlZd dlZd dlZd dlmZmZ d dl mZ d dlm Z m Z ddlmZ G dd� d�Z e dd �ZdS ) � N)�Counter�defaultdict)�partial)�AppRegistryNotReady�ImproperlyConfigured� )� AppConfigc @ s� e Zd ZdZd/dd�Zd0dd�Zdd � Zd d� Zdd � Zdd� Z e jdd�d1dd��Zd2dd�Z dd� Zdd� Zdd� Zdd� Ze jdd�dd � �Zd!d"� Zd#d$� Zd%d&� Zd'd(� Zd)d*� Zd+d,� Zd-d.� ZdS )3�Appsz� A registry that stores the configuration of installed applications. It also keeps track of models, e.g. to provide reverse relations. � c C s� |d u r t tjt d�r td��tt�| _i | _g | _ d | _ | _| _t �� | _t �� | _d| _tt�| _|d ur~| �|� d S )N�appsz+You must supply an installed_apps argument.F)�hasattr�sys�modules�__name__�RuntimeErrorr �dict� all_models�app_configs�stored_app_configs� apps_ready�models_ready�ready� threading�Event�ready_event�RLock�_lock�loading�list�_pending_operations�populate)�self�installed_appsr r �U/home/gouroczh/virtualenv/pat/3.9/lib/python3.9/site-packages/django/apps/registry.py�__init__ s z Apps.__init__Nc C sF | j r dS | j�� | j r*W d � dS | jr8td��d| _|D ]J}t|t�rV|}n t�|�}|j| jv rzt d|j ��|| j|j<