etianen / django-watson

Full-text multi-table search application for Django. Easy to install and use, with good performance.
BSD 3-Clause "New" or "Revised" License
1.2k stars 130 forks source link

AttributeError: 'module' object has no attribute 'register' #192

Closed huangzhongkai closed 7 years ago

huangzhongkai commented 7 years ago

hi, i have a issue with the django-1.6.8;

Traceback :

Traceback (most recent call last): File "/Users/huangzhongkai/company_code/Pro2.0/manage.py", line 10, in execute_from_command_line(sys.argv) File "/Library/Python/2.7/site-packages/django/core/management/init.py", line 399, in execute_from_command_line utility.execute() File "/Library/Python/2.7/site-packages/django/core/management/init.py", line 392, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv self.execute(*args, **options.dict) File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 280, in execute translation.activate('en-us') File "/Library/Python/2.7/site-packages/django/utils/translation/init.py", line 130, in activate return _trans.activate(language) File "/Library/Python/2.7/site-packages/django/utils/translation/trans_real.py", line 188, in activate _active.value = translation(language) File "/Library/Python/2.7/site-packages/django/utils/translation/trans_real.py", line 177, in translation default_translation = _fetch(settings.LANGUAGE_CODE) File "/Library/Python/2.7/site-packages/django/utils/translation/trans_real.py", line 159, in _fetch app = import_module(appname) File "/Library/Python/2.7/site-packages/django/utils/importlib.py", line 40, in import_module import(name) File "/Library/Python/2.7/site-packages/corsheaders/init.py", line 1, in from .checks import check_settings # noqa: F401 File "/Library/Python/2.7/site-packages/corsheaders/checks.py", line 14, in @checks.register AttributeError: 'module' object has no attribute 'register'

check.py

from django.core import checks @checks.register def check_settings(app_configs, **kwargs): pass

Any help would be appreciated, thank you very much :)

etianen commented 7 years ago

It looks like a 3rd party package called corsheaders is not compatible with django 1.6.8. This appears unrelated to django-watson.

On Wed, 25 Jan 2017 at 02:26 huangzhongkai notifications@github.com wrote:

hi, i have a issue with the django-1.6.8;

Traceback :

Traceback (most recent call last): File "/Users/huangzhongkai/company_code/Pro2.0/manage.py", line 10, in execute_from_command_line(sys.argv) File "/Library/Python/2.7/site-packages/django/core/management/init.py", line 399, in execute_from_command_line utility.execute() File "/Library/Python/2.7/site-packages/django/core/management/init.py", line 392, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv self.execute(*args, *options.dict) File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 280, in execute translation.activate('en-us') File "/Library/Python/2.7/site-packages/django/utils/translation/init.py", line 130, in activate return _trans.activate(language) File "/Library/Python/2.7/site-packages/django/utils/translation/trans_real.py", line 188, in activate _active.value = translation(language) File "/Library/Python/2.7/site-packages/django/utils/translation/trans_real.py", line 177, in translation default_translation = _fetch(settings.LANGUAGE_CODE) File "/Library/Python/2.7/site-packages/django/utils/translation/trans_real.py", line 159, in _fetch app = import_module(appname) File "/Library/Python/2.7/site-packages/django/utils/importlib.py", line 40, in import_module import(name) File "/Library/Python/2.7/site-packages/corsheaders/init*.py", line 1, in from .checks import check_settings # noqa: F401 File "/Library/Python/2.7/site-packages/corsheaders/checks.py", line 14, in @checks.register AttributeError: 'module' object has no attribute 'register'

app.py

from django.core import checks @checks.register def check_settings(app_configs, **kwargs): pass

Any help would be appreciated, thank you very much :)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/etianen/django-watson/issues/192, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJFCEbSZM_uaTe-5L9-poE4h7O1TYq2ks5rVrLggaJpZM4LtB7W .