I am trying to upgrade my Django 1.10 project from python 2.7 to python 3, and basically have issues with the following code snippet:
class QuerySetManager(models.Manager):
def get_queryset(self):
pass
def __getattr__(self, attr, *args):
return self.get_queryset()
If I comment out __getattr__
part from my code, everything works just fine. Otherwise, I end up with error:
django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet
Any ideas how to rewrite the code to run under python 3.x ?