HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/django/core/checks/__pycache__/caches.cpython-310.pyc
o

�a�	�@s�ddlZddlmZddlmZmZddlmZddlm	Z	m
Z
mZmZe	dedd	�Z
ee
j�d
d��Zee
jdd
�dd��Zee
j�dd��ZdS)�N)�settings)�DEFAULT_CACHE_ALIAS�caches)�FileBasedCache�)�Error�Tags�Warning�registerz4You must define a '%s' cache in your CACHES setting.zcaches.E001��idcKsttjvrtgSgS�N)rr�CACHES�E001)�app_configs�kwargs�r�;/usr/lib/python3/dist-packages/django/core/checks/caches.py�!check_default_cache_is_configureds
rT)�deploycs$g}dD]�}tt|d�}|sq|dkr1t�}|D]}t|ttf�r%|\}}|�t�|��	��qnt�|��	�h}tj
D]R}t|}	t|	t�sHq<t�|	j
��	��t�fdd�|D��r^d}
nt�fdd�|D��rld}
nt�fdd�|D��rzd	}
nq<|�td
|�d|
�d|�d
�dd��q<q|S)N)�
MEDIA_ROOT�STATIC_ROOT�STATICFILES_DIRSrc3s�|]}|�kVqdSr
r��.0�path��
cache_pathrr�	<genexpr>*s�z3check_cache_location_not_exposed.<locals>.<genexpr>�matchesc3s�|]}|�jvVqdSr
��parentsrrrrr,��z	is insidec3s�|]}�|jvVqdSr
r rrrrr.r"�contains�Your 'zf' cache configuration might expose your cache or lead to corruption of your data because its LOCATION � �.zcaches.W002r)�getattrr�set�
isinstance�list�tuple�add�pathlib�Path�resolverrr�_dir�any�appendr	)rr�errors�name�setting�paths�staticfiles_dir�_�alias�cache�relationrrr� check_cache_location_not_exposedsF�

��
��r<cKs\g}tj��D]$\}}t|}t|t�sqt�|d���s+|�	t
d|�d�dd��q|S)N�LOCATIONr$z@' cache LOCATION path is relative. Use an absolute path instead.zcaches.W003r)rr�itemsrr)rr-r.�is_absoluter2r	)rrr3r9�configr:rrr�"check_file_based_cache_is_absolute;s

��rA)r-�django.confr�django.core.cacherr�$django.core.cache.backends.filebasedr�rrr	r
rrr<rArrrr�<module>s�

$