Ticket #15199: 15199-staticfiles-handler.patch

File 15199-staticfiles-handler.patch, 805 bytes (added by Bruno Renié, 14 years ago)

Patch for the StaticFilesHandler

  • django/contrib/staticfiles/handlers.py

     
    4040
    4141        * the host is provided as part of the base_url
    4242        * the request's path isn't under the media path (or equal)
     43        * the request's path is under MEDIA_URL
    4344        """
    44         return (self.base_url[2] != path and
    45             path.startswith(self.base_url[2]) and not self.base_url[1])
     45        return (self.base_url[2] != path
     46                and path.startswith(self.base_url[2])
     47                and not self.base_url[1]
     48                and not path.startswith(settings.MEDIA_URL))
    4649
    4750    def file_path(self, url):
    4851        """
Back to Top