Ńň
ĽžYMc           @   s   d  Z  d d k Z d d k Z d d k Z d d k l Z d d k l Z d d k l	 Z	 d d k
 l Z d d k l Z d e d  Z d S(	   s   
Views and functions for serving static files. These are only to be used during
development, and SHOULD NOT be used in a production setting.

i˙˙˙˙N(   t   settings(   t   ImproperlyConfigured(   t   Http404(   t   static(   t   findersc         K   s   t  i o | o t d   n t i t i |   i d  } t i	 |  } | p t
 d |   n t i i |  \ } } t i |  | d | | S(   sR  
    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::

        (r'^(?P<path>.*)$', 'django.contrib.staticfiles.views.serve')

    in your URLconf.

    It uses the django.views.static view to serve the found files.
    sj   The staticfiles view can only be used in debug mode or if the the --insecure option of 'runserver' is usedt   /s   '%s' could not be foundt   document_root(   R    t   DEBUGR   t	   posixpatht   normpatht   urllibt   unquotet   lstripR   t   findR   t   ost   patht   splitR   t   serve(   t   requestR   R   t   insecuret   kwargst   normalized_patht   absolute_path(    (    sJ   /usr/local/lib/python2.6/dist-packages/django/contrib/staticfiles/views.pyR      s    !(   t   __doc__R   R   R
   t   django.confR    t   django.core.exceptionsR   t   django.httpR   t   django.viewsR   t   django.contrib.staticfilesR   t   Nonet   FalseR   (    (    (    sJ   /usr/local/lib/python2.6/dist-packages/django/contrib/staticfiles/views.pyt   <module>   s   