discolabs / django-shopify-sync

A package for synchronising Django models with Shopify resources. Unmaintained.
Other
3 stars 4 forks source link

django 1.9 issue #1

Open andresdouglas opened 8 years ago

andresdouglas commented 8 years ago

When installing in a django 1.9 site, run into the following error:

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.

I believe it has to do with this issue: https://github.com/etianen/django-reversion/issues/481, especifically that you shouldn't import models from your app's init.py file

andresdouglas commented 8 years ago

I know you're not actively maintaining this repo, but just thought I'd keep track of it here.

andresdouglas commented 8 years ago

Adding the following lines in your site's settings.py below the SECRET_KEY declaration seems to fix things:

import django
django.setup()
andresdouglas commented 8 years ago

Nevermind, that doesn't seem to work. Seems like that call to setup is premature and installed apps won't actually get processed.

zzantares commented 8 years ago

For me I was trying to use the User model in an apps.py, I had to move my import from the top of the file to be inside the ready() function in my AppConfig class, now it works fine.