-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Description
I ran to it when adding SortOrderField into models.py, where I also had an abstract model
so when I did from iommi.models import SortOrderField in setup_db_compat, I got
File "iommi/iommi/__init__.py", line 58, in <module>
setup_db_compat()
File "iommi/iommi/_db_compat.py", line 7, in setup_db_compat
setup_db_compat_iommi()
File "iommi/iommi/_db_compat.py", line 173, in setup_db_compat_iommi
from iommi.models import SortOrderField
File "iommi/iommi/models.py", line 17, in <module>
class Orderable(models.Model):
File "iommi/venv/lib/python3.12/site-packages/django/db/models/base.py", line 129, in __new__
app_config = apps.get_containing_app_config(module)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "iommi/venv/lib/python3.12/site-packages/django/apps/registry.py", line 260, in get_containing_app_config
self.check_apps_ready()
File "iommi/venv/lib/python3.12/site-packages/django/apps/registry.py", line 138, in check_apps_ready
raise AppRegistryNotReady("Apps aren't loaded yet.")
that's why I put the field in model_fields.py, but if it was called in app ready, we wouldn't have that problem
Metadata
Metadata
Assignees
Labels
No labels