-
Couldn't load subscription status.
- Fork 1.2k
Closed
Description
In [6]: from django.contrib.auth.models import User
In [7]: User.objects.all().model
Out[7]: django.contrib.auth.models.User
In [8]: type(User.objects.all())
Out[8]: django.db.models.query.QuerySet
In [9]: type(MongoUser.objects.all())
Out[9]: mongoengine.queryset.queryset.QuerySet
In [10]: MongoUser.objects.all().model
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-11-846b78ff429d> in <module>()
----> 1 MongoUser.objects.all().model
AttributeError: 'QuerySet' object has no attribute 'model'
Here MongoUser is a Document class and User is a simple user model from django.contrib.auth.
This is necessary to make it work with dhango-rest-framework library.
Thanks for all the great work!
Metadata
Metadata
Assignees
Labels
No labels