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 129 forks source link

Django 1.9 app loading issue #142

Closed codingjoe closed 8 years ago

codingjoe commented 8 years ago

This bug pop up in Django 1.9rc2

Traceback (most recent call last):
  File "./manage.py", line 11, in <module>
    execute_from_command_line(sys.argv)
  File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/django/core/management/__init__.py", line 350, in execute_from_command_line
    utility.execute()
  File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/django/core/management/__init__.py", line 324, in execute
    django.setup()
  File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/django/apps/config.py", line 90, in create
    module = import_module(entry)
  File "/opt/python/2.7.9/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/watson/__init__.py", line 11, in <module>
    from watson.admin import SearchAdmin
  File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/watson/admin.py", line 8, in <module>
    from watson.registration import SearchEngine, SearchAdapter
  File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/watson/registration.py", line 14, in <module>
    from django.contrib.contenttypes.models import ContentType
  File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/django/contrib/contenttypes/models.py", line 159, in <module>
    class ContentType(models.Model):
  File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/django/db/models/base.py", line 94, in __new__
    app_config = apps.get_containing_app_config(module)
  File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/django/apps/registry.py", line 239, in get_containing_app_config
    self.check_apps_ready()
  File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/django/apps/registry.py", line 124, in check_apps_ready
    raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
codingjoe commented 8 years ago

@etianen my little trick didn't do any good, but you see how it is failing on current django:master

etianen commented 8 years ago

Check out this branch: https://github.com/etianen/django-watson/tree/django-1.9

It should support Django 1.9 just fine.

However, it introduces a breaking change.

# Old imports
import watson

# New imports
from watson import search as watson
from watson.admin import SearchAdmin
codingjoe commented 8 years ago

@etianen I don't mind braking changes. That's why we have semantic versioning.

codingjoe commented 8 years ago

@etianen that in mind, what's keeping you from merging an releasing? are there any release blocking issues that I could help with?

etianen commented 8 years ago

Nope, I'm going to release first thing tomorrow morning.

On Wed, 2 Dec 2015 at 15:02 Johannes Hoppe notifications@github.com wrote:

@etianen https://github.com/etianen that in mind, what's keeping you from merging an releasing? are there any release blocking issues that I could help with?

— Reply to this email directly or view it on GitHub https://github.com/etianen/django-watson/pull/142#issuecomment-161325076 .

codingjoe commented 8 years ago

Cool :+1: