You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from tastypie import authorization
from tastypie_mongoengine import resources
from test_app import documents
class PersonResource(resources.MongoEngineResource):
class Meta:
queryset = documents.Person.objects.all()
allowed_methods = ('get', 'post', 'put', 'delete')
authorization = authorization.Authorization()
doesn't work with python3:
def __new__(cls, name, bases, attrs):
meta = attrs.get('Meta')
if meta and hasattr(meta, 'queryset'):
> setattr(meta, 'object_class', meta.queryset.model)
E AttributeError: 'QuerySet' object has no attribute 'model'
Example from docs:
doesn't work with python3:
objects.all()
doesn't have model attribute that is required here:https://github.com/toastdriven/django-tastypie/blob/master/tastypie/resources.py#L1691
The text was updated successfully, but these errors were encountered: