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
Hi, I am writing an API for my application using tastypie-mongoengine but I am getting an error. The error is: TypeError: Error when calling the metaclass bases, object of type 'NoneType' has no len()
My resources.py file is:
import logging
from django.core import serializers
from tastypie.resources import *
from tastypie.authorization import Authorization
from tastypie_mongoengine.resources import MongoEngineResource
from api.models import User
logger = logging.getLogger(__name__)
class UserResource(MongoEngineResource):
class Meta:
queryset = User.objects.all()
resource_name = 'user'
collection = "user"
authorization = Authorization()
excludes = ['password']
#allowed_methods = ['get']
def dehydrate(self, bundle):
# bundle.data['name'] = 'hydrate1'
print type(bundle)
bundle.data.save()
logger.info(serializers.serialize("xml", bundle.data))
return bundle
Any help?
The text was updated successfully, but these errors were encountered:
Hi, I am writing an API for my application using tastypie-mongoengine but I am getting an error. The error is: TypeError: Error when calling the metaclass bases, object of type 'NoneType' has no len()
My resources.py file is:
Any help?
The text was updated successfully, but these errors were encountered: