
 X1                 @   s   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 l m Z d d	 d
  Z d S)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)unquote)staticFc             K   s   t  j r | r t  n  t j t |   j d  } t j |  } | s | j	 d  sh | d k rw t d   n  t d |   n  t
 j j |  \ } } t j |  | d | | S)av  
    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

        url(r'^(?P<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normpathr   lstripr   findendswithospathsplitr   serve)requestr   ZinsecurekwargsZnormalized_pathZabsolute_pathr	    r   N/home/ubuntu/projects/ifolica/build/django/django/contrib/staticfiles/views.pyr      s    	r   )__doc__r   r   Zdjango.confr   Zdjango.contrib.staticfilesr   Zdjango.httpr   Z#django.utils.six.moves.urllib.parser   Zdjango.viewsr   r   r   r   r   r   <module>   s   