o Úøaíã@sRdZddlZddlZddlmZddlmZddlmZddl m Z d dd „Z dS) 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)ÚstaticFcKsztjs|st‚t |¡ d¡}t |¡}|s)| d¡s|dkr#tdƒ‚td|ƒ‚t j   |¡\}}t j ||fd|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('', 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©rúB/usr/lib/python3/dist-packages/django/contrib/staticfiles/views.pyrs   r)F) Ú__doc__rr Ú django.confrÚdjango.contrib.staticfilesrÚ django.httprÚ django.viewsrrrrrrÚs