
    k"g                     P    d Z ddlZddlZddlmZ ddlmZ ddlmZ ddl	m
Z
 ddZy)	z
Views and functions for serving static files. These are only to be used during
development, and SHOULD NOT be used in a production setting.

    N)settings)finders)Http404)staticc                 |   t         j                  s|st        t        j                  |      j                  d      }t        j                  |      }|s/|j                  d      s|dk(  rt        d      t        d|z        t        j                  j                  |      \  }}t        j                  | |fd|i|S )as  
    Serve static files below a given point in the directory structure or
    from locations inferred from the staticfiles finders.

    To use, put a URL pattern such as::

        from django.contrib.staticfiles import views

        path('<path:path>', views.serve)

    in your URLconf.

    It uses the django.views.static.serve() view to serve the found files.
    / z'Directory indexes are not allowed here.z'%s' could not be founddocument_root)r   DEBUGr   	posixpathnormpathlstripr   findendswithospathsplitr   serve)requestr   insecurekwargsnormalized_pathabsolute_pathr
   s          Y/var/www/html/djangosite/lib/python3.12/site-packages/django/contrib/staticfiles/views.pyr   r      s     >>(((.55c:OLL1M==CDD/$677''--6M4<<M]MfMM    )F)__doc__r   r   django.confr   django.contrib.staticfilesr   django.httpr   django.viewsr   r    r   r   <module>r"      s$    
    .  Nr   