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/contrib/staticfiles/management/commands/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.pyc
�
r�\c@s�ddlmZddlZddlZddlmZddlmZddlm	Z	m
Z
ddlmZddl
mZddlmZdd	lmZdd
lmZmZde
fd��YZdS(
i����(tunicode_literalsN(tmake_option(tFileSystemStorage(tCommandErrort
NoArgsCommand(t
smart_text(t
SortedDict(t
LazyObject(tinput(tfinderststoragetCommandcBs}eZdZejeddddddedd�ed	dddd
dedd�edd
dddgdddddd�edddddddedd�edddddddedd�edddddddedd�ed dddd!dedd"�fZd#ZeZ	d$�Z
d%�Zd&�Zd'�Z
d(d)�Zd*�Zd+�Zd,�Zd-�Zd.�ZRS(/uw
    Command that allows to copy or symlink static files from different
    locations to the settings.STATIC_ROOT.
    u	--noinputtactionustore_falsetdestuinteractivetdefaultthelpu-Do NOT prompt the user for input of any kind.u--no-post-processupost_processu$Do NOT post process collected files.u-iu--ignoreuappenduignore_patternstmetavaruPATTERNu`Ignore files or directories matching this glob-style pattern. Use multiple times to ignore more.u-nu	--dry-runu
store_trueudry_runu+Do everything except modify the filesystem.u-cu--clearuclearu[Clear the existing files using the storage before trying to copy or link the original file.u-lu--linkulinku7Create a symbolic link to each file instead of copying.u--no-default-ignoreuuse_default_ignore_patternsuIDon't ignore the common private glob-style patterns 'CVS', '.*' and '*~'.u*Collect static files in a single location.cOs�tt|�j||�g|_g|_g|_g|_tj|_y|jj	d�Wnt
k
ryt|_n
Xt
|_dS(Nu(tsuperRt__init__tcopied_filestsymlinked_filestunmodified_filestpost_processed_filesR
tstaticfiles_storagetpathtNotImplementedErrortFalsetlocaltTrue(tselftargstkwargs((s^/tmp/pip-install-XxeQeY/django/django/contrib/staticfiles/management/commands/collectstatic.pyR3s				

cKs�|d|_t|jdd��|_|d|_|d|_|d|_|d}|dry|d	d
dg7}ntt|��|_	|d|_
d
S(uA
        Set instance variables based on an options dict
        uinteractiveu	verbosityiulinkuclearudry_runuignore_patternsuuse_default_ignore_patternsuCVSu.*u*~upost_processN(tinteractivetinttgett	verbositytsymlinktcleartdry_runtlisttsettignore_patternstpost_process(RtoptionsR)((s^/tmp/pip-install-XxeQeY/django/django/contrib/staticfiles/management/commands/collectstatic.pytset_optionsAs





cCs$|jrItjdkr.tdtj��n|jsItd��qIn|jrb|jd�n|jrw|j}n	|j}t	�}x�t
j�D]�}x�|j|j
�D]n\}}t|dd�r�tjj|j|�}n|}||kr�||f||<||||�q�q�Wq�W|jr�t|jd�r�|jj|d|j�}x�|D]�\}}	}
t|
t�r�|jjd|�|jjd�|
�n|
r�|jd	||	fd
d�|jj|�qb|jd|�qbWni|j|j d
6|j!d6|jd6S(u
        Perform the bulk of the work of collectstatic.

        Split off from handle_noargs() to facilitate testing.
        uwin32u2Symlinking is not supported by this platform (%s).u&Can't symlink to a remote destination.uuprefixupost_processR&uPost-processing '%s' failed!uPost-processed '%s' as '%s'tleveliuSkipped post-processing '%s'umodifiedu
unmodifiedupost_processedN("R$tsystplatformRRR%t	clear_dirt	link_filet	copy_fileRR	tget_findersR'R)tgetattrtNonetosRtjointprefixR*thasattrR
R&t
isinstancet	ExceptiontstderrtwritetlogRtappendRRR(Rthandlertfound_filestfinderRR
t
prefixed_patht	processort
original_pathtprocessed_patht	processed((s^/tmp/pip-install-XxeQeY/django/django/contrib/staticfiles/management/commands/collectstatic.pytcollectPsJ								
c
Ks�|j|�dg}|jr/|jd�n|jd�|j�rt|jjrt|jj}|jd|�nd}|jd�|jr�|jd�n
|jd�|jd�|jr�t	d	j
|��d
kr�td��n|j�}t
|d�}t
|d
�}t
|d�}|jdkr�d}|i|d6d|dkr`d	ndd6|jrwdndd6|r�d|nd	d6|d
r�d|nd	d
6|dr�d|p�d	d6}	|jj|	�ndS(Nu
uGYou have activated the --dry-run option so no files will be modified.

udYou have requested to collect static files at the destination
location as specified in your settingsu:

    %s

u.

u!This will DELETE EXISTING FILES!
u$This will overwrite existing files!
uNAre you sure you want to do this?

Type 'yes' to continue, or 'no' to cancel: uuyesu"Collecting static files cancelled.umodifiedu
unmodifiedupost_processediu^
%(modified_count)s %(identifier)s %(action)s%(destination)s%(unmodified)s%(post_processed)s.
umodified_countustatic fileusu
identifieru	symlinkeducopieduactionu to '%s'udestinationu, %s unmodifiedu, %s post-processed(R,R&R?tis_local_storageR
tlocationR5R%R RR7RRHtlenR#R$tstdoutR=(
RR+tmessagetdestination_patht	collectedtmodified_counttunmodified_counttpost_processed_countttemplatetsummary((s^/tmp/pip-install-XxeQeY/django/django/contrib/staticfiles/management/commands/collectstatic.pyt
handle_noargs�sF
		

	
$
icCs&|j|kr"|jj|�ndS(u"
        Small log helper
        N(R#RLR=(RtmsgR-((s^/tmp/pip-install-XxeQeY/django/django/contrib/staticfiles/management/commands/collectstatic.pyR>�scCs:t|jjt�r$|jj}n	|j}t|t�S(N(t
issubclassR
t	__class__Rt_wrappedR:R(RR
((s^/tmp/pip-install-XxeQeY/django/django/contrib/staticfiles/management/commands/collectstatic.pyRI�s	cCs�|jj|�\}}xy|D]q}tjj||�}|jrc|jdt|�dd�q|jdt|�dd�|jj|�qWx*|D]"}|j	tjj||��q�WdS(uX
        Deletes the given relative path using the destination storage backend.
        uPretending to delete '%s'R-iu
Deleting '%s'N(
R
tlistdirR6RR7R&R>RtdeleteR0(RRtdirstfilestftfpathtd((s^/tmp/pip-install-XxeQeY/django/django/contrib/staticfiles/management/commands/collectstatic.pyR0�s
		
cCs�|jj|�r|y|jj|�}Wntttfk
rDn�Xy|j|�}Wntttfk
rtn�X|jr�|jj|�}nd}|j	dd�|j	dd�kr;|j
r�|r�tjj|�p�|j
o�|o�tjj|�s;||j
kr#|j
j|�n|jd|�tSn|jrX|jd|�q||jd|�|jj|�ntS(uR
        Checks if the target file should be deleted if it already exists
        tmicrosecondiuSkipping '%s' (not modified)uPretending to delete '%s'u
Deleting '%s'N(R
texistst
modified_timetOSErrorRtAttributeErrorRRR5treplaceR$R6tislinkRR?R>RR&R[R(RRRCtsource_storagettarget_last_modifiedtsource_last_modifiedt	full_path((s^/tmp/pip-install-XxeQeY/django/django/contrib/staticfiles/management/commands/collectstatic.pytdelete_file�s6		cCs�||jkr |jd|�S|j|||�s9dS|j|�}|jrk|jd|dd�nj|jd|dd�|jj|�}ytjtjj|��Wnt	k
r�nXtj
||�||jkr�|jj|�ndS(u*
        Attempt to link ``path``
        u&Skipping '%s' (already linked earlier)NuPretending to link '%s'R-iuLinking '%s'(RR>RlRR&R
R6tmakedirstdirnameRdR$R?(RRRCRhtsource_pathRk((s^/tmp/pip-install-XxeQeY/django/django/contrib/staticfiles/management/commands/collectstatic.pyR1s 	
cCs"||jkr |jd|�S|j|||�s9dS|j|�}|jrk|jd|dd�n�|jd|dd�|jr�|jj|�}ytjtjj	|��Wq�t
k
r�q�Xn|j|��}|jj||�WdQX||jkr|jj
|�ndS(u7
        Attempt to copy ``path`` with storage
        u&Skipping '%s' (already copied earlier)NuPretending to copy '%s'R-iuCopying '%s'(RR>RlRR&RR
R6RmRnRdtopentsaveR?(RRRCRhRoRktsource_file((s^/tmp/pip-install-XxeQeY/django/django/contrib/staticfiles/management/commands/collectstatic.pyR2%s$		
(t__name__t
__module__t__doc__Rtoption_listRRRRtrequires_model_validationRR,RHRUR>RIR0RlR1R2(((s^/tmp/pip-install-XxeQeY/django/django/contrib/staticfiles/management/commands/collectstatic.pyRsF		
			;	6			,	(t
__future__RR6R.toptparseRtdjango.core.files.storageRtdjango.core.management.baseRRtdjango.utils.encodingRtdjango.utils.datastructuresRtdjango.utils.functionalRtdjango.utils.six.movesRtdjango.contrib.staticfilesR	R
R(((s^/tmp/pip-install-XxeQeY/django/django/contrib/staticfiles/management/commands/collectstatic.pyt<module>s

https://t.me/AnonymousX5 - 2025