Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError at / 'Settings' object has no attribute 'COMPRESS_JS_COMPRESSOR' #333

Closed
serkansokmen opened this issue Nov 3, 2012 · 26 comments

Comments

@serkansokmen
Copy link

i put COMPRESS_DEBUG_TOGGLE = 'blahblah' to my production settings, and now i got:

AttributeError at /
'Settings' object has no attribute 'COMPRESS_JS_COMPRESSOR'

and points me to this line in my template:

{% compress css %}

here is my production settings:

########## COMPRESSION CONFIGURATION
COMPRESS_ENABLED = True
# Default : the opposite of DEBUG

COMPRESS_OFFLINE = False
COMPRESS_STORAGE = DEFAULT_FILE_STORAGE
COMPRESS_CSS_FILTERS += [
    #'compressor.filters.cssmin.CSSMinFilter',
    'compressor.filters.template.TemplateFilter',
]
COMPRESS_JS_FILTERS += [
    #'compressor.filters.jsmin.JSMinFilter',
    'compressor.filters.template.TemplateFilter',
]

COMPRESS_DEBUG_TOGGLE = 'compressor'
########## END COMPRESSION CONFIGURATION

any suggestions?

(edit by @diox : original bug report info: #173 (comment) )

@diox
Copy link
Member

diox commented Nov 7, 2012

If you launch a shell, do you have access to both settings.COMPRESS_DEBUG_TOGGLE and settings.COMPRESS_JS_COMPRESSOR ?

@serkansokmen
Copy link
Author

i can import settings.COMPRESS_DEBUG_TOGGLE in shell, but not settings.COMPRESS_JS_COMPRESSOR.
But COMPRESS_DEBUG_TOGGLE is in my base settings as well, that's why it's imported properly, when i remove it from base settings, i get this:

AttributeError at /
'Settings' object has no attribute 'COMPRESS_DEBUG_TOGGLE'

Last night i tried to override COMPRESS_JS_COMPRESSOR & COMPRESS_CSS_COMPRESSOR in base settings, then it gave me this error:

AttributeError at /
'Settings' object has no attribute 'COMPRESS_PRECOMPILERS'

i think that there is some problem with settings not importing properly, because it is the next setting in compressor configuration?

@diox
Copy link
Member

diox commented Nov 7, 2012

Here is how the default settings are set:

  • django loads compressor's models.py because it's in INSTALLED_APPS
  • this imports CompressorConf from compressor.conf
  • this imports AppConf from appconf
  • this loads the AppConfMetaClass metaclass, which has the following code:
    setattr(new_class._meta.holder, prefixed_name, value)

I have no idea why it's not happening in your case :( The only thing I can suggest right now is to try adding some debugging to the relevant files in compressor and appconf to see what's going on, and/or make public a reduced mini-project exhibiting this behaviour.

@evanreiser
Copy link

I'm seeing a similar issue when I run unit tests and use the @override_settings decorator. When I do this there is a local settings context which loads the project's default settings.

Because compressor adds its settings by modifying the local cache of django.conf.settings the compressor settings aren't in the local settings context for the unit test.

Maybe the solution is to change the way the django_compressor adds it's default settings?

@diox
Copy link
Member

diox commented Nov 13, 2012

@evanreiser : I haven't been able to reproduce this myself. Can you provide a patch adding a testcase that fails with override_settings ? Thanks.

@evanreiser
Copy link

When i look at django.conf.settings outside of the class being modified by the overrides_settings decorator, all the COMPRESSOR settings appear correctly. However once inside the class with the decorator, None fo the COMPRESSOR settings are set (while other settings found in settings.py all exist). I believe this is because appconf is modifying the original settings instance.

I'll create a patch + testcase if i have some free time.

@migajek
Copy link

migajek commented Nov 18, 2012

same here ... django 1.4.1

'Settings' object has no attribute 'COMPRESS_DEBUG_TOGGLE'

I do have 'compressor' in INSTALLED_APPS

installed compress with pip install django_compress, added i to the installed apps and static file finders, and - when adding to the template - it throws this error

@diox
Copy link
Member

diox commented Nov 19, 2012

@migajek (and others) If you are able to reproduce, please, please publish a small app and/or project exhibiting the issue (with steps to reproduce in case it's not obvious). Or a proper unit test.

I've wrote unit tests against both django-compressor and django-appconf playing with the settings in various ways and did not manage to reproduce the issue. Obviously I'm missing something, it'd be great if one of you could help here. There is very little we can do if we can't reproduce it :(

@serkansokmen
Copy link
Author

I have two projects that i used compressor so far, one of which is django-skel based, and it works like a charm both locally and on Heroku. The other project is on Amazon AWS, and that one works perfect locally, but when deployed, gives me this error. I don't know if i can reproduce the issue with a simple project because of the complexity of the projects & different settings for local & remote, but here is my remote settings, which might help? By the way, we get the error message both with & without Django S3 Folder Storage:

from settings.base import *
import djcelery

DEBUG = False
TEMPLATE_DEBUG = DEBUG

TEMPLATE_LOADERS = (
    ('django.template.loaders.cached.Loader', (
        'django.template.loaders.filesystem.Loader',
        'django.template.loaders.app_directories.Loader',
        # 'django.template.loaders.eggs.Loader',
    )),
)

# Add django-s3-folder-storage to INSTALLED_APPS
INSTALLED_APPS += (
    's3_folder_storage',
)


########## AWS CONFIGURATION
AWS_ACCESS_KEY_ID = '*******************************'
AWS_SECRET_ACCESS_KEY = '************************************************'
AWS_STORAGE_BUCKET_NAME = 'bucket_name'
AWS_QUERYSTRING_AUTH = False
AWS_S3_FILE_OVERWRITE = False

AWS_AUTO_CREATE_BUCKET = True
AWS_QUERYSTRING_AUTH = False

# AWS cache settings, don't change unless you know what you're doing:
AWS_EXPIREY = 60 * 60 * 24 * 7
AWS_HEADERS = {
    'Cache-Control': 'max-age=%d, s-maxage=%d, must-revalidate' % (AWS_EXPIREY, AWS_EXPIREY)
}
########## END AWS CONFIGURATION


########## CELERY CONFIGURATION
djcelery.setup_loader()

BROKER_TRANSPORT = 'sqs'
BROKER_TRANSPORT_OPTIONS = {
    'region': 'us-east-1',
}
BROKER_USER = AWS_ACCESS_KEY_ID
BROKER_PASSWORD = AWS_SECRET_ACCESS_KEY
########## END CELERY CONFIGURATION


########## S3 FOLDER STORAGE CONFIGURATION
DEFAULT_FILE_STORAGE = 's3_folder_storage.s3.DefaultStorage'
DEFAULT_S3_PATH = "media"
# DEFAULT_S3_PATH = "/"
#
STATICFILES_STORAGE = 's3_folder_storage.s3.StaticStorage'
STATIC_S3_PATH = "static"

MEDIA_ROOT = '/%s/' % DEFAULT_S3_PATH
# MEDIA_ROOT = '/'
#
MEDIA_URL = '//%s.s3.amazonaws.com/media/' % AWS_STORAGE_BUCKET_NAME
# MEDIA_URL = '//%s.s3.amazonaws.com/' % AWS_STORAGE_BUCKET_NAME
#
STATIC_ROOT = "/%s/" % STATIC_S3_PATH
STATIC_URL = '//%s.s3.amazonaws.com/static/' % AWS_STORAGE_BUCKET_NAME
ADMIN_MEDIA_PREFIX = STATIC_URL + 'admin/'
########## END S3 FOLDER STORAGE CONFIGURATION

# THUMBNAIL_STORAGE defaults to DEFAULT_FILE_STORAGE
THUMBNAIL_DEFAULT_STORAGE = DEFAULT_FILE_STORAGE


########## COMPRESSION CONFIGURATION
# COMPRESS_ENABLED = True
# Default : the opposite of DEBUG

# see https://github.com/jezdez/django_compressor/issues/226
COMPRESS_OUTPUT_DIR = 'STATIC_CACHE'

# See: http://django_compressor.readthedocs.org/en/latest/settings/#django.conf.settings.COMPRESS_OFFLINE
COMPRESS_OFFLINE = False

# See: http://django_compressor.readthedocs.org/en/latest/settings/#django.conf.settings.COMPRESS_STORAGE
COMPRESS_STORAGE = DEFAULT_FILE_STORAGE

# See: http://django_compressor.readthedocs.org/en/latest/settings/#django.conf.settings.COMPRESS_CSS_FILTERS
COMPRESS_CSS_FILTERS += [
    'compressor.filters.cssmin.CSSMinFilter',
]

# See: http://django_compressor.readthedocs.org/en/latest/settings/#django.conf.settings.COMPRESS_JS_FILTERS
COMPRESS_JS_FILTERS += [
    'compressor.filters.jsmin.JSMinFilter',
]

COMPRESS_DEBUG_TOGGLE = 'nocompress'
########## END COMPRESSION CONFIGURATION

@honi
Copy link

honi commented Nov 28, 2012

I have the same issue. Locally with django's runserver everything works. When deployed with gunicorn/nginx, it breaks with the same errors the other people described.

I did a pip freeze in my local machine and installed exactly the same version of all the libraries used.

I managed to make it work by installing django-compressor==1.1.2, so maybe there is a commit between 1.1.2 and 1.2 that changed something?

@EmilStenstrom
Copy link

We're also getting this while using using thet @override_settings decorator. Here's the full stacktrace:

Traceback (most recent call last):
  File "/Projects/kundo/untrusted/tests.py", line 40, in test_verified_unspam
    response = self.client.post(url, {'answer': 'booogus'}, follow=True)
  File "/Envs/kundo/lib/python2.7/site-packages/django/test/client.py", line 451, in post
    response = self._handle_redirects(response, **extra)
  File "/Envs/kundo/lib/python2.7/site-packages/django/test/client.py", line 560, in _handle_redirects
    response = self.get(url.path, QueryDict(url.query), follow=False, **extra)
  File "/Envs/kundo/lib/python2.7/site-packages/django/test/client.py", line 439, in get
    response = super(Client, self).get(path, data=data, **extra)
  File "/Envs/kundo/lib/python2.7/site-packages/django/test/client.py", line 244, in get
    return self.request(**r)
  File "/Envs/kundo/lib/python2.7/site-packages/django/core/handlers/base.py", line 117, in get_response
    response = middleware_method(request, e)
  File "/Envs/kundo/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/Projects/kundo/util/decorators.py", line 19, in inner
    return view(request, forum_slug, *args, **kwargs)
  File "/Projects/kundo/dialog/views.py", line 150, in detail
    'dialog': dialog,
  File "/Envs/kundo/lib/python2.7/site-packages/django/shortcuts/__init__.py", line 44, in render
    return HttpResponse(loader.render_to_string(*args, **kwargs),
  File "/Envs/kundo/lib/python2.7/site-packages/django/template/loader.py", line 176, in render_to_string
    return t.render(context_instance)
  File "/Envs/kundo/lib/python2.7/site-packages/django/template/base.py", line 140, in render
    return self._render(context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/test/utils.py", line 62, in instrumented_test_render
    return self.nodelist.render(context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/template/base.py", line 823, in render
    bit = self.render_node(node, context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/template/debug.py", line 74, in render_node
    return node.render(context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/template/loader_tags.py", line 123, in render
    return compiled_parent._render(context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/test/utils.py", line 62, in instrumented_test_render
    return self.nodelist.render(context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/template/base.py", line 823, in render
    bit = self.render_node(node, context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/template/debug.py", line 74, in render_node
    return node.render(context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/template/loader_tags.py", line 123, in render
    return compiled_parent._render(context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/test/utils.py", line 62, in instrumented_test_render
    return self.nodelist.render(context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/template/base.py", line 823, in render
    bit = self.render_node(node, context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/template/debug.py", line 74, in render_node
    return node.render(context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/template/loader_tags.py", line 123, in render
    return compiled_parent._render(context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/test/utils.py", line 62, in instrumented_test_render
    return self.nodelist.render(context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/template/base.py", line 823, in render
    bit = self.render_node(node, context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/template/debug.py", line 74, in render_node
    return node.render(context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/template/loader_tags.py", line 123, in render
    return compiled_parent._render(context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/test/utils.py", line 62, in instrumented_test_render
    return self.nodelist.render(context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/template/base.py", line 823, in render
    bit = self.render_node(node, context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/template/debug.py", line 74, in render_node
    return node.render(context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/template/loader_tags.py", line 123, in render
    return compiled_parent._render(context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/test/utils.py", line 62, in instrumented_test_render
    return self.nodelist.render(context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/template/base.py", line 823, in render
    bit = self.render_node(node, context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/template/debug.py", line 74, in render_node
    return node.render(context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/template/loader_tags.py", line 155, in render
    return self.render_template(self.template, context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/template/loader_tags.py", line 137, in render_template
    output = template.render(context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/template/base.py", line 140, in render
    return self._render(context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/test/utils.py", line 62, in instrumented_test_render
    return self.nodelist.render(context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/template/base.py", line 823, in render
    bit = self.render_node(node, context)
  File "/Envs/kundo/lib/python2.7/site-packages/django/template/debug.py", line 74, in render_node
    return node.render(context)
  File "/Envs/kundo/lib/python2.7/site-packages/compressor/templatetags/compress.py", line 72, in render
    if self.debug_mode(context):
  File "/Envs/kundo/lib/python2.7/site-packages/compressor/templatetags/compress.py", line 37, in debug_mode
    if settings.COMPRESS_DEBUG_TOGGLE:
  File "/Envs/kundo/lib/python2.7/site-packages/django/utils/functional.py", line 185, in inner
    return func(self._wrapped, *args)
AttributeError: 'Settings' object has no attribute 'COMPRESS_DEBUG_TOGGLE'

@EmilStenstrom
Copy link

More configuration info about our use case:

We run our tests with a custom manage.py that looks like this:

#!/usr/bin/env python
import os
import sys

if __name__ == "__main__":
    if len(sys.argv) > 1 and (sys.argv[1] == 'test' or sys.argv[1] == 'testserver'):
        os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_settings")
    else:
        os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")

    from django.core.management import execute_from_command_line

    execute_from_command_line(sys.argv)

test_settings.py starts with the line:

from settings import *

... and then all the differences between testing and dev are listed. No compression settings, it's off in settings.py.

WORKAROUND: Add these line to the end of test_settings.py:

COMPRESS_DEBUG_TOGGLE = False
COMPRESS_CSS_COMPRESSOR = 'compressor.css.CssCompressor'
COMPRESS_JS_COMPRESSOR = 'compressor.js.JsCompressor'
COMPRESS_PRECOMPILERS = ()
COMPRESS_PARSER = 'compressor.parser.AutoSelectParser'

@ishirav
Copy link

ishirav commented May 1, 2014

I ran into the same problem, and found an ugly workaround that seems to solve it. Add the following to the bottom of your settings file:

from compressor.conf import CompressorConf
for key, value in CompressorConf().configured_data.iteritems():
    locals()['COMPRESS_' + key] = value

@bhagany
Copy link

bhagany commented May 23, 2014

For what it's worth, I was able to reproduce this by importing something from compressor in my settings.py. In my case, it was:

from compressor.contrib.jinja2ext import CompressorExtension

but I've tried with a few other compressor imports with the same result. I believe it's something along the lines of a circular import, and the real error is getting swallowed somewhere.

@EmilStenstrom
Copy link

@bhagany This could be the case for me too. I have a custom path in my COMPRESS_CSS_FILTERS setting, that in turn imports from compressor.filters.datauri import CssDataUriFilter. So an import issue makes sense.

@TechNickAI
Copy link

Same problem. @ishirav's workaround worked for me. Thanks! @changetip 1 coffee

@changetip
Copy link

Hi @ishirav, @gorillamania sent you a Bitcoin tip worth 1 coffee (2.295 mBTC/$1.50), ➔ collect it at ChangeTip.com.

Is this real?

@moimael
Copy link

moimael commented Aug 21, 2014

Had the same problem using django-avatar (which also use django-appconf) and @ishirav (slightly modified) workaround worked for me too ! Seems to be a django-appconf issue to me.

@panosmm
Copy link

panosmm commented Sep 5, 2014

I got this problem too. It was caused by having DJANGO_SETTINGS_MODULE set to a local settings file (I have separate dev and prod settings files). The appconf app assumes its 'django.conf.settings', and this causes the problem. appconf needs to check environment vars for the settings module, which it does not as of v0.6...

@nferrari
Copy link

Same problem here. My PR above resolves the problem for me but unfortunately does not pass Travis tests...

@jdunck
Copy link

jdunck commented Mar 21, 2015

I believe I have found the root cause.

The issue is that loading settings can be reentrant, so that LazySettings._setup gets called twice.

This means that AppConfMetaClass's holder refers to an object that doesn't end up being the LazySettings._wrapped object. setattr(new_class._meta.holder, prefixed_name, value) modifies an object that ends up not being the final settings.

Here is a log -- I modified Django to print entry and exit of LazySettings._setup, Settings.init (including object ID), as well as AppConfMetaClass setting default and configured values.

You can set that Settings.init imports the underlying settings module, which in my case imports waffle -- and waffle then refers to django.core.cache, which requires settings, starting the LazySettings._setup path again. It loads successfully, but the holder object is not the object that eventually becomes LazySettings._wrapped.

Personally I think re-loading settings is an antipattern, but it's also pretty common, since loading settings loads INSTALLED_APPS models.py, which generally pulls in most of the codebase.

I'm unclear on a clean fix here. It seems like the "right" place to fix this would be Django, but that doesn't help any projects running on less than django+1. It also seems likely that with 1.7's app loading rework, this may no longer be an issue. (I'm on 1.6 presently, upgrading to 1.7 soon.)

I do wonder why compressor doesn't internally refer to AppConf rather than django.conf.settings.

For now, I think AppConf should issue a warning when, after loading, it notices that django.conf.settings._wrapped is not the object that AppConf._meta.holder was.

Do you maintain AppConf, or is that effectively dead now that it's incorporated into 1.7?

(styleseat)mbp3:styleseat jdunck$ python manage.py shell
LazySettings._setup enter
  File "manage.py", line 9, in <module>
    execute_from_command_line(sys.argv)
  File "/Users/jdunck/consulting/ss/venv/styleseat/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/Users/jdunck/consulting/ss/venv/styleseat/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/jdunck/consulting/ss/venv/styleseat/lib/python2.7/site-packages/django/core/management/__init__.py", line 261, in fetch_command
    commands = get_commands()
  File "/Users/jdunck/consulting/ss/venv/styleseat/lib/python2.7/site-packages/django/core/management/__init__.py", line 107, in get_commands
    apps = settings.INSTALLED_APPS
  File "/Users/jdunck/consulting/ss/venv/styleseat/lib/python2.7/site-packages/django/conf/__init__.py", line 58, in __getattr__
    self._setup(name)
  File "/Users/jdunck/consulting/ss/venv/styleseat/lib/python2.7/site-packages/django/conf/__init__.py", line 39, in _setup
    print "\n".join(traceback.format_stack())

Settings.__init__ enter 4419867728
LazySettings._setup enter
  File "manage.py", line 9, in <module>
    execute_from_command_line(sys.argv)
  File "/Users/jdunck/consulting/ss/venv/styleseat/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/Users/jdunck/consulting/ss/venv/styleseat/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/jdunck/consulting/ss/venv/styleseat/lib/python2.7/site-packages/django/core/management/__init__.py", line 261, in fetch_command
    commands = get_commands()
  File "/Users/jdunck/consulting/ss/venv/styleseat/lib/python2.7/site-packages/django/core/management/__init__.py", line 107, in get_commands
    apps = settings.INSTALLED_APPS
  File "/Users/jdunck/consulting/ss/venv/styleseat/lib/python2.7/site-packages/django/conf/__init__.py", line 58, in __getattr__
    self._setup(name)
  File "/Users/jdunck/consulting/ss/venv/styleseat/lib/python2.7/site-packages/django/conf/__init__.py", line 52, in _setup
    self._wrapped = Settings(settings_module)
  File "/Users/jdunck/consulting/ss/venv/styleseat/lib/python2.7/site-packages/django/conf/__init__.py", line 133, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/Users/jdunck/consulting/ss/venv/styleseat/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
    __import__(name)
  File "/Users/jdunck/consulting/ss/code/styleseat/settings.py", line 1262, in <module>
    import waffle
  File "/Users/jdunck/consulting/ss/venv/styleseat/lib/python2.7/site-packages/waffle/__init__.py", line 6, in <module>
    from django.core.cache import cache
  File "/Users/jdunck/consulting/ss/venv/styleseat/lib/python2.7/site-packages/django/core/cache/__init__.py", line 69, in <module>
    if DEFAULT_CACHE_ALIAS not in settings.CACHES:
  File "/Users/jdunck/consulting/ss/venv/styleseat/lib/python2.7/site-packages/django/conf/__init__.py", line 58, in __getattr__
    self._setup(name)
  File "/Users/jdunck/consulting/ss/venv/styleseat/lib/python2.7/site-packages/django/conf/__init__.py", line 39, in _setup
    print "\n".join(traceback.format_stack())

Settings.__init__ enter 4432526480
Settings.__init__ exit
LazySettings._setup exit, _wrapped is 4432526480
default COMPRESS_CACHE_BACKEND = None
default COMPRESS_CACHE_KEY_FUNCTION = compressor.cache.simple_cachekey
...
applying AppConf to 4432526480
configured COMPRESS_CACHE_BACKEND = default
configured COMPRESS_CACHE_KEY_FUNCTION = compressor.cache.simple_cachekey
...
Settings.__init__ exit
LazySettings._setup exit, _wrapped is 4419867728

@nferrari
Copy link

FYI, I encountered the problem with Django 1.8b1.

@jdunck
Copy link

jdunck commented Mar 24, 2015

@nferrari Can you confirm that your LazySettings._setup is being called twice?

@aldon-cmd
Copy link

I encountered a similar problem when I tried to use reverse in my settings file. first I got an error saying COMPRESS_DEBUG_TOGGLE did not exist. after adding that attribue, I got another error saying that COMPRESS_JS_COMPRESSOR did not exist. The problem went away when I used reverse_lazy

@carltongibson
Copy link
Contributor

If I'm following this right, if this is an issue (rather than a programming error — trying to do things in settings at import time) then it's an issue with AppConf, and not compressor.

The relevant location seems to be django-compressor/django-appconf#13.

For sanity's sake, and to concentrate the chances of getting a resolution, we should close this and point all discussion there.

@carltongibson
Copy link
Contributor

Closing this as per my last comment: it's an AppConf issue.

If anyone can help reproduce, please comment on be django-compressor/django-appconf#13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.