403Webshell
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/core/management/commands/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/django/core/management/commands/__pycache__/loaddata.cpython-311.pyc
�

�|�e(9��n�ddlZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
ddlmZddl
mZddlmZddlmZmZddlmZdd	lmZdd
lmZmZmZmZmZmZddlm Z 	ddl!Z!dZ"n
#e#$rd
Z"YnwxYw	ddl$Z$dZ%n
#e#$rd
Z%YnwxYwdZ&Gd�de��Z'Gd�dej(��Z)d�Z*dS)�N)�product)�apps)�settings)�serializers)�ImproperlyConfigured)�BaseCommand�CommandError)�no_style)�parse_apps_and_model_labels)�DEFAULT_DB_ALIAS�
DatabaseError�IntegrityError�connections�router�transaction)�cached_propertyTF�-c�~�eZdZdZdZd�Zd�Zd�Zd�Ze	j
d���d	���Zed
���Z
d�ZdS)�Commandz.Installs the named fixture(s) in the database.zcNo database fixture specified. Please provide the path of at least one fixture in the command line.c�8�|�dddd���|�dtd���|�d	d
d���|�d
dddd���|�dddgd���|�dd���dS)N�args�fixture�+zFixture labels.)�metavar�nargs�helpz
--databasezXNominates a specific database to load fixtures into. Defaults to the "default" database.)�defaultrz--app�	app_labelz,Only look for fixtures in the specified app.)�destrz--ignorenonexistentz-i�
store_true�ignorez[Ignores entries in the serialized data for fields that do not currently exist on the model.)�actionrrz-ez	--exclude�appendzKAn app_label or app_label.ModelName to exclude. Can be used multiple times.)r"rrz--formatz2Format of serialized data when reading from stdin.)r)�add_argumentr)�self�parsers  �J/usr/lib/python3/dist-packages/django/core/management/commands/loaddata.py�
add_argumentszCommand.add_arguments-s������F�I�S�GX��Y�Y�Y�����"2�k�	�	
�	
�	
�	����+�?�	�	
�	
�	
�	���!�4��8�1�	�	
�	
�	
�
	����+�h��^�	�	
�	
�	
�	����E�	�	
�	
�	
�	
�	
�c���|d|_|d|_|d|_|d|_t	|d��\|_|_|d|_tj	|j���5|�
|��ddd��n#1swxYwYtj|j��r&t|j�
��dSdS)Nr!�databaser�	verbosity�exclude�format��using)r!r0rr,r�excluded_models�
excluded_appsr.r�atomic�loaddata�get_autocommitr�close)r%�fixture_labels�optionss   r'�handlezCommand.handleEs���h�'����Z�(��
� ��-��� ��-���3N�w�W`�Oa�3b�3b�0���d�0��h�'���
�
�d�j�
1�
1�
1�	*�	*��M�M�.�)�)�)�	*�	*�	*�	*�	*�	*�	*�	*�	*�	*�	*����	*�	*�	*�	*��%�d�j�1�1�	,���
�#�)�)�+�+�+�+�+�	,�	,s�>B � B$�'B$c��t|j}d|_d|_d|_t��|_tj��|_	tdftjdftdfd�dfd�|_trt jdf|jd<t$r,t&jdf|jd<t&jdf|jd<|D]}|�|��rn�dS|���5g|_|D]}|�|���|jD]}|�|j�	���	ddd��n#1swxYwYd
�|jD��}	|�|���n#t6$r}d|zf|_�d}~wwxYw|jdkr�|j�t?��|j��}|rl|j d
kr|j!�"d��|�#��5}|D]}	|�$|	���	ddd��n#1swxYwY|j dkrl|j|jkr+|j!�"d|j|jfz��dS|j!�"d|j|j|jfz��dSdS)Nr�rb�rc��tjS�N)�sys�stdin)rs r'�<lambda>z"Command.loaddata.<locals>.<lambda>fs��C�I�r))N�gz�zipr@�bz2�lzma�xzr/c�&�g|]}|jj��S�)�_meta�db_table)�.0�models  r'�
<listcomp>z$Command.loaddata.<locals>.<listcomp>�s��E�E�E��u�{�+�E�E�Er))�table_nameszProblem installing fixtures: %s�zResetting sequences�z)Installed %d object(s) from %d fixture(s)z1Installed %d object(s) (of %d) from %d fixture(s))%rr0�
fixture_count�loaded_object_count�fixture_object_count�set�modelsr�get_public_serializer_formats�serialization_formats�open�gzip�GzipFile�SingleZipReader�compression_formats�has_bz2rD�BZ2File�has_lzmarE�LZMAFile�
find_fixtures�constraint_checks_disabled�objs_with_deferred_fields�
load_label�save_deferred_fields�check_constraints�	Exceptionr�ops�sequence_reset_sqlr
r,�stdout�write�cursor�execute)
r%r7�
connection�
fixture_label�objrN�e�sequence_sqlrl�lines
          r'r4zCommand.loaddataWs��� ���,�
����#$�� �$%��!��e�e���%0�%N�%P�%P��"���,��=�$�'�#�S�)�-�-�t�4�	$
�$
�� ��	A�/2�{�C�.@�D�$�U�+��	B�04�
�s�/C�D�$�V�,�.2�m�S�-A�D�$�T�*�,�	�	�M��!�!�-�0�0�
���
�
�F�
�
2�
2�
4�
4�	;�	;�-/�D�*�!/�
/�
/�
����
�.�.�.�.��5�
;�
;���(�(�t�z�(�:�:�:�:�
;�		;�	;�	;�	;�	;�	;�	;�	;�	;�	;�	;����	;�	;�	;�	;�F�E���E�E�E��	��(�(�[�(�A�A�A�A���	�	�	�7�!�;�=�A�F������	�����#�a�'�'�%�>�<�<�X�Z�Z���U�U�L��
-��>�Q�&�&��K�%�%�&;�<�<�<��&�&�(�(�-�F� ,�-�-�����t�,�,�,�,�-�-�-�-�-�-�-�-�-�-�-�-����-�-�-�-��>�Q����(�D�,D�D�D���!�!�?��/��1C�D�E������
��!�!�G��/��1J�D�L^�_�`�������s=�>AE�E�E�/F�
F!�F�F!�H>�>I�Ic���|jdk}|�|��D�]�\}}}|�tj�|����\}}}|j|\}	}
|	||
��}	|xjdz
c_d}d}
|jdkr1|j�	d|�d|�dt|���d���tj|||j
|jd	�
��}|D�]0}|dz
}|jjj|jvst'|j��|jvr�<t+j|j
|jj��r�|
dz
}
|j�|jj��	|�|j
���|r|j�	d|
zd
���nH#t6t8t:f$r.}d|jjj|jj|d�zf|_ �d}~wwxYw|j!r|j"�#|����2|r|r|j�	��|xj$|
z
c_$|xj%|z
c_%n6#tL$r)}tO|tP��sd|�d|��f|_ �d}~wwxYw	|�)��n#|�)��wxYw|dkrtUj+d|ztX�����dS)z&Load fixtures files for a given label.�rPrrOzInstalling z
 fixture 'z' from �.T)r0�ignorenonexistent�handle_forward_referencesr/z
Processed %i object(s).�)�endingz9Could not load %(object_label)s(pk=%(pk)s): %(error_msg)s)�object_label�pk�	error_msgN�Problem installing fixture '�': z=No fixture data found for '%s'. (File format may be invalid.))-r,ra�
parse_name�os�path�basenamer\rQrjrk�humanizer�deserializer0r!�objectrI�
app_configr2�typer1r�allow_migrate_model�	__class__rU�add�saver
r�
ValueError�labelr|r�deferred_fieldsrcr#rRrSrg�
isinstancer	r6�warnings�warn�RuntimeWarning)r%ro�
show_progress�fixture_file�fixture_dir�fixture_name�_�ser_fmt�cmp_fmt�open_method�moder�objects_in_fixture�loaded_objects_in_fixture�objectsrprqs                 r'rdzCommand.load_label�s�����!�+�
�7;�7I�7I�-�7X�7X�=	�=	�3�L�+�|�"&�/�/�"�'�2B�2B�<�2P�2P�"Q�"Q��A�w�� $� 8�� A��K��!�k�,��5�5�G�1
 ��"�"�a�'�"�"�%&�"�,-�)��>�Q�&�&��K�%�%�%�"�7�7�L�L�L�(�;�2G�2G�2G�2G�I����
&�1��W�D�J�$�+�.2�����
#�C�C�C�&�!�+�&��
�(�3�t�7I�I�I� ���,�,��0D�D�D� ��1�$�*�c�j�>R�S�S�"�1�Q�6�1������
�(<�=�=�=�"��H�H�4�:�H�6�6�6�,�"� $�� 1� 1�$?�B[�$[�+-�!2�!"�!"�!"���
!.�~�z�J�"�"�"�&a�03�
�0@�0F�&)�j�m�-.�e�e�'�& �A�F�
"�����
"�����*�C��6�=�=�c�B�B�B���(�}�(��K�%�%�'�'�'��(�(�,E�E�(�(��)�)�-?�?�)�)�)���
�
�
�!�!�\�2�2�Z�Z�GS�|�|�UV�UV�W�Y�A�F������
����*��
�
�������
�
��������"�Q�&�&��
� �".�/�"�����s=	�=	sP�;C>I �:<F7�6I �7G<�)G7�7G<�<A#I �J,� 
J�*$J�J�J,�,KN)�maxsizec	���|tkrtdtfgS|�|��\�}}|jdg}|�t|j��n|g}|�|jn|g}|jdkr|j�d�z��tj
����r@tj
����g}tj
�
����nd|j}tj
jtj
����vr-�fd�|D��}tj
�
����d�t#|||��D��}�fd�|D��}	g}
|D�]E}|jdkr*|j�dt%|��z��g}tj
�|���}
t)jt)j|
��dz��D];}tj
�
|��|	vr|�||�f���<|jdkr0|s.|j�d	��d
t%|���d���t1|��dkr#t3d
��d
t%|���d����|
�|����G|
st3d�z���|
S)z%Find fixture files for a given label.NrOzLoading '%s' fixtures...c���g|]?}tj�|tj��������@SrH)r�r��join�dirname)rK�dir_r�s  �r'rMz)Command.find_fixtures.<locals>.<listcomp>�sG��� :� :� :�$(�!#����T�2�7�?�?�<�3P�3P� Q� Q� :� :� :r)c3�TK�|]#}d�d�|D����V��$dS)rvc3�K�|]}|�|V��	dSr>rH)rK�exts  r'�	<genexpr>z2Command.find_fixtures.<locals>.<genexpr>.<genexpr>�s'����1�1�S�S�1�S�1�1�1�1�1�1r)N�r�)rK�combos  r'r�z(Command.find_fixtures.<locals>.<genexpr>�sQ����
�
��
�H�H�1�1�E�1�1�1�1�1�
�
�
�
�
�
r)c�>��h|]}d��|f����S)rvr�)rK�suffixr�s  �r'�	<setcomp>z(Command.find_fixtures.<locals>.<setcomp>�s*���K�K�K��3�8�8�\�6�2�3�3�K�K�Kr)zChecking %s for fixtures...�*zNo fixture 'z' in rvrPzMultiple fixtures named 'z. Aborting.zNo fixture named '%s' found.)�
READ_STDINr�r0�listr\rWr,rjrkr�r��isabsr�r��fixture_dirs�sep�normpathrr�r��glob�iglob�escaper#�lenr	�extend)r%ror�r��	databases�cmp_fmts�ser_fmtsr��suffixes�targets�
fixture_filesr��fixture_files_in_dirr��	candidater�s               @r'razCommand.find_fixtures�s����J�&�&���z�2�3�3�)-����)G�)G�&��g�w��Z��&�	�5<�_�4��0�1�1�1�7�)��18��4�-�-�w�i���>�Q����K���8�<�G�H�H�H�
�7�=�=��&�&�	>��G�O�O�L�9�9�:�L��7�+�+�L�9�9�L�L��,�L��w�{�b�g�.�.�|�<�<�<�<� :� :� :� :�,8� :� :� :��!�w�/�/��=�=��
�
� ��H�h�?�?�
�
�
��L�K�K�K�(�K�K�K���
�'�	7�	7�K��~��"�"���!�!�"?�(�;�BW�BW�"W�X�X�X�#%� ��7�<�<��\�:�:�D�!�Z���D�(9�(9�C�(?�@�@�
X�
X�	��7�#�#�I�.�.�'�9�9�(�/�/��K��0V�W�W�W���~��"�"�+?�"���!�!�!�#/�<�<��+�1F�1F�1F�1F�#H�I�I�I�
�'�(�(�1�,�,�"�l�!�\�\�8�K�#8�#8�#8�#8�:�;�;�;�
� � �!5�6�6�6�6��	N��=��L�M�M�M��r)c�H�g}tj}t|��tt|����krt	d���tj��D]�}|j}tj	�
|j	d��}||vrt	d|�d|�d����|jr||jkr�[tj	�|��r|�
|����|�|��|�
d��d�|D��S)z�
        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.
        z*settings.FIXTURE_DIRS contains duplicates.�fixtures�'z*' is a default fixture directory for the 'z4' app and cannot be listed in settings.FIXTURE_DIRS.ryc�L�g|]!}tj�|����"SrH)r�r��realpath)rK�ds  r'rMz(Command.fixture_dirs.<locals>.<listcomp>7s(��2�2�2���� � ��#�#�2�2�2r))r�FIXTURE_DIRSr�rTrr�get_app_configsr�r�r�r�r�isdirr#r�)r%�dirsr�r�r�app_dirs      r'r�zCommand.fixture_dirss)�����,���|����C��$5�$5� 6� 6�6�6�&�'S�T�T�T��.�0�0�	%�	%�J�"�(�I��g�l�l�:�?�J�?�?�G��,�&�&�*�*�HO���QZ�QZ�QZ�\����
�~�
�)�t�~�"=�"=���w�}�}�W�%�%�
%����G�$�$�$�����L�!�!�!����B����2�2�T�2�2�2�2r)c��|tkr%|jstd���t|jdfS|�dd��}t	|��dkr"|d|jvr|d}|dd�}nd}t	|��dkrY|d|jvr|d}|dd�}n9tdd�|dd����d	|d�d
����d}d�|��}|||fS)zW
        Split fixture name in name, serialization format, compression format.
        z3--format must be specified when reading from stdin.r@rvrOrP���Nr~rz% is not a known serialization format.)r�r.r	�rsplitr�r\rWr�)r%r��partsr�r��names      r'r�zCommand.parse_name9s*���:�%�%��;�
Z�"�#X�Y�Y�Y��t�{�G�3�3��#�#�C��+�+���u�:�:��>�>�e�B�i�4�+C�C�C��B�i�G��#�2�#�J�E�E��G��u�:�:��>�>��R�y�D�6�6�6���)���c�r�c�
���"�l�/2�x�x��c�r�c�
�/C�/C�/C�/C�U�2�Y�Y�Y�P�Q�Q�Q��G��x�x������W�g�%�%r))�__name__�
__module__�__qualname__r�missing_args_messager(r9r4rd�	functools�	lru_cacherarr�r�rHr)r'rr&s�������;�D�	+��

�
�
�0,�,�,�$F�F�F�P@�@�@�D�Y���&�&�&�7�7�'�&�7�r�3�3��_�3�:&�&�&�&�&r)rc�$��eZdZ�fd�Zd�Z�xZS)r[c���t��j|i|��t|�����dkrt	d���dS)NrPz.Zip-compressed fixtures must contain one file.)�super�__init__r��namelistr�)r%r�kwargsr�s   �r'r�zSingleZipReader.__init__\sQ��������$�)�&�)�)�)��t�}�}�����1�$�$��M�N�N�N�%�$r)c�r�tj�||���d��S)Nr)�zipfile�ZipFile�readr�)r%s r'r�zSingleZipReader.readas'����#�#�D�$�-�-�/�/�!�*<�=�=�=r))r�r�r�r�r��
__classcell__)r�s@r'r[r[ZsL�������O�O�O�O�O�
>�>�>�>�>�>�>r)r[c��|rd|zndS)Nz'%s'z
absolute pathrH)r�s r'r�r�es��&�;�6�G���O�;r))+r�r�rYr�r?r�r��	itertoolsr�django.appsr�django.confr�django.corer�django.core.exceptionsr�django.core.management.baserr	�django.core.management.colorr
�django.core.management.utilsr�	django.dbrr
rrrr�django.utils.functionalrrDr]�ImportErrorrEr_r�rr�r[r�rHr)r'�<module>r�s2��������������	�	�	�	�
�
�
�
��������������������� � � � � � �#�#�#�#�#�#�7�7�7�7�7�7�A�A�A�A�A�A�A�A�1�1�1�1�1�1�D�D�D�D�D�D�����������������4�3�3�3�3�3���J�J�J��G�G�������G�G�G�������K�K�K��H�H�������H�H�H������
�q&�q&�q&�q&�q&�k�q&�q&�q&�h	>�>�>�>�>�g�o�>�>�>�<�<�<�<�<s$�&A-�-A7�6A7�;B�B�B

Youez - 2016 - github.com/yon3zu
LinuXploit