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
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?