Open nim4n opened 9 years ago
I had the same problem and noticed that all examples I found on the net and here use authorization = Authorization() and not DjangoAuthorization().
Considering the error I got the idea that DjangoAuthorization relies on the Django ORM, which -of course- wasn't made for MongoDB use.
So I'm affraid that the only way is to write your own authorization. More info about that is here: http://django-tastypie.readthedocs.org/en/latest/authorization.html#implementing-your-own-authorization
At least for me this worked, but perhaps someone else has a better solution, as I'm also still a beginner regarding tastypie for mongoengine.
yes you must write your own authorization but another problem is default django permission in mongoengin does not work properly, I found the problem and solved It, you can see It in this link: https://github.com/MongoEngine/mongoengine/issues/898
I have some problem in using DjangoAuthorization , when I use this in my resource I get this error:
but without using this It works fine, am I missed some thing? my resource is: ''' class MainUserResource(resources.MongoEngineResource): enduser = fields.ToOneField('interface.api.EndUserResource', 'enduser', full=False, null=True, blank=True)