From f1553336523893ddd7bd8b478e799412012c9a91 Mon Sep 17 00:00:00 2001 From: David Fischer Date: Tue, 14 Aug 2018 09:06:59 -0700 Subject: [PATCH] Remove SelectiveFileSystemFolder finder workaround --- readthedocs/core/static.py | 18 ------------------ readthedocs/settings/base.py | 4 ---- 2 files changed, 22 deletions(-) delete mode 100644 readthedocs/core/static.py diff --git a/readthedocs/core/static.py b/readthedocs/core/static.py deleted file mode 100644 index cd3defbd180..00000000000 --- a/readthedocs/core/static.py +++ /dev/null @@ -1,18 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import division, print_function, unicode_literals - -from django.contrib.staticfiles.finders import FileSystemFinder - - -class SelectiveFileSystemFinder(FileSystemFinder): - - """ - Add user media paths in ``media/`` to ignore patterns. - - This allows collectstatic inside ``media/`` without collecting all of the - paths that include user files - """ - - def list(self, ignore_patterns): - ignore_patterns.extend(['epub', 'pdf', 'htmlzip', 'json', 'man', 'static']) - return super(SelectiveFileSystemFinder, self).list(ignore_patterns) diff --git a/readthedocs/settings/base.py b/readthedocs/settings/base.py index a9113c7ee08..f092cd7e6a3 100644 --- a/readthedocs/settings/base.py +++ b/readthedocs/settings/base.py @@ -176,10 +176,6 @@ def USE_PROMOS(self): # noqa os.path.join(SITE_ROOT, 'readthedocs', 'static'), os.path.join(SITE_ROOT, 'media'), ] - STATICFILES_FINDERS = [ - 'readthedocs.core.static.SelectiveFileSystemFinder', - 'django.contrib.staticfiles.finders.AppDirectoriesFinder', - ] TEMPLATES = [ {