File: staticfiles.py

package info (click to toggle)
python-django-compressor 4.5.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,108 kB
  • sloc: python: 4,900; makefile: 123; javascript: 5
file content (17 lines) | stat: -rw-r--r-- 583 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from django.apps import apps
from django.core.exceptions import ImproperlyConfigured

from compressor.conf import settings


if apps.is_installed("django.contrib.staticfiles"):
    from django.contrib.staticfiles import finders  # noqa

    if "compressor.finders.CompressorFinder" not in settings.STATICFILES_FINDERS:
        raise ImproperlyConfigured(
            "When using Django Compressor together with staticfiles, "
            "please add 'compressor.finders.CompressorFinder' to the "
            "STATICFILES_FINDERS setting."
        )
else:
    finders = None  # noqa