https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /lib64/python2.7/site-packages/django/core/management/commands/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/django/core/management/commands/loaddata.pyc
�
r�\c@s�ddlmZddlZddlZddlZddlZddlmZddlZddl	m
Z
ddlmZddl
mZmZddlmZddlmZmZmZmZmZmZdd	lmZdd
lmZddlmZmZddl m!Z!dd
l"m#Z#yddl$Z$e%Z&Wne'k
rUe(Z&nXdefd��YZ)dej*fd��YZ+d�Z,dS(i����(tunicode_literalsN(tmake_option(tsettings(tserializers(tBaseCommandtCommandError(tno_style(tconnectionstrouterttransactiontDEFAULT_DB_ALIAStIntegrityErrort
DatabaseError(t
get_app_paths(t
force_text(tcached_propertytmemoize(tupath(tproducttCommandc
Bs�eZdZdZejeddddddedd	�ed
ddddd
dedd�fZd�Z	d�Z
d�Zd�ZiZ
eee
d�Zed��Zd�ZRS(u.Installs the named fixture(s) in the database.ufixture [fixture ...]u
--databasetactionustoretdestudatabasetdefaultthelpuXNominates a specific database to load fixtures into. Defaults to the "default" database.u--ignorenonexistentu-iu
store_trueuignoreu[Ignores entries in the serialized data for fields that do not currently exist on the model.cOs�|jd�|_|jd�|_t|�s?td��nt|jd��|_tjd|j��|j	|�WdQXtj
|j�r�t|jj�ndS(NuignoreudatabaseucNo database fixture specified. Please provide the path of at least one fixture in the command line.u	verbositytusing(
tgettignoreRtlenRtintt	verbosityR	t commit_on_success_unless_managedtloaddatatget_autocommitRtclose(tselftfixture_labelstoptions((sJ/tmp/pip-install-XxeQeY/django/django/core/management/commands/loaddata.pythandle*sc
Cs
t|j}d|_d|_d|_t�|_tj�|_	it
d6tj
d6td6|_tr}tj|jd<n|j��#x|D]}|j|�q�WWdQXg|jD]}|jj^q�}y|jd|�Wn&tk
r}d|f|_�nX|jdkr�|jjt�|j�}|r�|jdkr_|jjd�n|j �}x|D]}	|j!|	�qrW|j"�q�n|jd	kr|j|jkr�|jjd
|j|jf�q|jjd|j|j|jf�ndS(Niugzuzipubz2ttable_namesuProblem installing fixtures: %siuResetting sequences
iu)Installed %d object(s) from %d fixture(s)u1Installed %d object(s) (of %d) from %d fixture(s)(#RRt
fixture_counttloaded_object_counttfixture_object_counttsettmodelsRtget_public_serializer_formatstserialization_formatstopentNonetgziptGzipFiletSingleZipReadertcompression_formatsthas_bz2tbz2tBZ2Filetconstraint_checks_disabledt
load_labelt_metatdb_tabletcheck_constraintst	Exceptiontargstopstsequence_reset_sqlRRtstdouttwritetcursortexecuteR!(
R"R#t
connectiont
fixture_labeltmodelR&tetsequence_sqlRBtline((sJ/tmp/pip-install-XxeQeY/django/django/core/management/commands/loaddata.pyR@sH
			



"
cCsHxA|j|�D]0\}}}|jtjj|��\}}}|j|}||d�}	z�yo|jd7_d}
d}|jdkr�|jj	d||t
|�f�ntj||	d|j
d|j�}x�|D]�}
|
d7}
tj|j
|
jj�r�|d7}|jj|
jj�y|
jd|j
�Wq�ttfk
r�}di|
jjjd	6|
jjjd
6|
jjd6t|�d6f|_�q�Xq�q�W|j|7_|j|
7_Wn>t k
r}t!|t"�sd
||ff|_n�nXWd|	j#�X|
dkrt"d|��qqWdS(u9
        Loads fixtures files for a given label.
        uriiiu#Installing %s fixture '%s' from %s.RtignorenonexistentuFCould not load %(app_label)s.%(object_name)s(pk=%(pk)s): %(error_msg)su	app_labeluobject_nameupku	error_msgu#Problem installing fixture '%s': %sNu=No fixture data found for '%s'. (File format may be invalid.)($t
find_fixturest
parse_nametostpathtbasenameR3R'RR@RAthumanizeRtdeserializeRRRtallow_syncdbtobjectt	__class__R+taddtsaveRRR9t	app_labeltobject_nametpkRR=R(R)R<t
isinstanceRR!(R"REtfixture_filetfixture_dirtfixture_namet_tser_fmttcmp_fmttopen_methodtfixturetobjects_in_fixturetloaded_objects_in_fixturetobjectstobjRG((sJ/tmp/pip-install-XxeQeY/django/django/core/management/commands/loaddata.pyR8ssN$




cs�|j|�\�}}|jdg}|dkrHt|jj��n|g}|dkritj�n|g}|jdkr�|j	j
d��ntjj
��r�tjj��g}tjj���nd|j}tjj�kr8g|D]'}tjj|tjj���^q�}tjj���nd�t|||�D�}	t�fd�|	D��}
g}x|D]
}|jdkr�|j	j
dt|��ng}
x[tjtjj|�d��D]7}tjj|�|
kr�|
j||�f�q�q�W|jdkrL|
rL|j	j
d�t|�f�nt|
�dkr}td	�t|�f��n|j|
�q}W�d
kr�|r�tjd��n|S(
u8
        Finds fixture files for a given label.
        iuLoading '%s' fixtures...css(|]}djd�|D��VqdS(u.css|]}|r|VqdS(N((t.0text((sJ/tmp/pip-install-XxeQeY/django/django/core/management/commands/loaddata.pys	<genexpr>�sN(tjoin(Rgtcombo((sJ/tmp/pip-install-XxeQeY/django/django/core/management/commands/loaddata.pys	<genexpr>�sc3s$|]}dj�|f�VqdS(u.N(Ri(Rgtsuffix(R](sJ/tmp/pip-install-XxeQeY/django/django/core/management/commands/loaddata.pys	<genexpr>�suChecking %s for fixtures...u*uNo fixture '%s' in %s.iu-Multiple fixtures named '%s' in %s. Aborting.uinitial_datauNo fixture named '%s' found.N(RLRR/tlistR3tkeysRR,RR@RARMRNtisabstdirnameROtfixture_dirstsepRiRR*RPtglobtiglobtappendRRtextendtwarningstwarn(R"RER_R`t	databasestcmp_fmtstser_fmtsRptdir_tsuffixesttargetst
fixture_filesR\tfixture_files_in_dirt	candidate((R]sJ/tmp/pip-install-XxeQeY/django/django/core/management/commands/loaddata.pyt_find_fixtures�sH*!	1
)icCs�g}xTt�D]I}tjjtjj|�d�}tjj|�r|j|�qqW|jtt	j
��|jd�g|D]*}ttjjtjj
|���^q�}|S(u�
        Return a list of fixture directories.

        The list contains the 'fixtures' subdirectory of each installed
        application, if it exists, the directories in FIXTURE_DIRS, and the
        current directory.
        ufixturesu(R
RMRNRiRotisdirRtRuRlRtFIXTURE_DIRSRtabspathtrealpath(R"tdirsRNtd((sJ/tmp/pip-install-XxeQeY/django/django/core/management/commands/loaddata.pyRp�s	!
7cCs�|jdd�}t|�dkrN|d|jkrN|d}|d }nd}t|�dkr�|d|jkr�|d}|d }q�tddj|d �|df��nd}dj|�}|||fS(uX
        Splits fixture name in name, serialization format, compression format.
        u.iii����uHProblem installing fixture '%s': %s is not a known serialization format.uN(trsplitRR3R/R-RRi(R"R]tpartsR`R_tname((sJ/tmp/pip-install-XxeQeY/django/django/core/management/commands/loaddata.pyRL�s%



$(t__name__t
__module__RR=Rtoption_listRR
tFalseR%RR8R�t_label_to_fixtures_cacheRRKRRpRL(((sJ/tmp/pip-install-XxeQeY/django/django/core/management/commands/loaddata.pyRs		3	3	6R2cBseZd�Zd�ZRS(cOsAtjj|||�t|j��dkr=td��ndS(Niu.Zip-compressed fixtures must contain one file.(tzipfiletZipFilet__init__Rtnamelistt
ValueError(R"R=tkwargs((sJ/tmp/pip-install-XxeQeY/django/django/core/management/commands/loaddata.pyR�scCstjj||j�d�S(Ni(R�R�treadR�(R"((sJ/tmp/pip-install-XxeQeY/django/django/core/management/commands/loaddata.pyR�s(R�R�R�R�(((sJ/tmp/pip-install-XxeQeY/django/django/core/management/commands/loaddata.pyR2s	cCs|rd|SdS(Nu'%s'u
absolute path((Ro((sJ/tmp/pip-install-XxeQeY/django/django/core/management/commands/loaddata.pyRPs(-t
__future__RRrR0RMR�toptparseRRvtdjango.confRtdjango.coreRtdjango.core.management.baseRRtdjango.core.management.colorRt	django.dbRRR	R
RRtdjango.db.modelsR
tdjango.utils.encodingRtdjango.utils.functionalRRtdjango.utils._osRt	itertoolsRR5tTrueR4tImportErrorR�RR�R2RP(((sJ/tmp/pip-install-XxeQeY/django/django/core/management/commands/loaddata.pyt<module>s0.


�

https://t.me/AnonymousX5 - 2025