This may just be a wontfix, but wanted to at least make the issue known. In short rest_framework.compat cannot be imported during the Django's app registration/initialization process when django-guardian is in the INSTALLED_APPS. guardian.shortcuts imports Django's auth models, which in turn raises an AppRegistryNotReady exception.
Relevant portion of the stack trace:
File "lib/python2.7/site-packages/django_filters/compat.py", line 19, in <module>
from rest_framework.compat import coreapi
File "lib/python2.7/site-packages/rest_framework/compat.py", line 210, in <module>
import guardian.shortcuts # Fixes #1624
File "lib/python2.7/site-packages/guardian/shortcuts.py", line 6, in <module>
from django.contrib.auth.models import Group, Permission
See carltongibson/django-filter#525 for more context.
Checklist
Steps to reproduce
As an example, add 'guardian' and 'django_filters' to INSTALLED_APPS.
This may just be a wontfix, but wanted to at least make the issue known. In short
rest_framework.compatcannot be imported during the Django's app registration/initialization process when django-guardian is in theINSTALLED_APPS.guardian.shortcutsimports Django's auth models, which in turn raises anAppRegistryNotReadyexception.Relevant portion of the stack trace:
See carltongibson/django-filter#525 for more context.
Checklist
masterbranch of Django REST framework.Steps to reproduce
As an example, add
'guardian'and'django_filters'toINSTALLED_APPS.