I have the following resource:
class MyUserResource(resources.MongoEngineResource):
class Meta:
...
authentication = MyKeyAuthentication()
authorization = ApiKeyAuthorization()
def override_urls(self):
return [...]
All API calls which are standard-tastypie are routed through the authentification and authorization. But all customized functions/urls (which are in my override_urls) simply ignore the auth/auth functions…
Any ideas why?
Edit:
Maybe the problem is that the dispatcher isn’t called. The question remains why that is… and how I can change this behavior!
Ok, finally I found out that when customizing / overriding my urls I also override the standard behavior of calling
wrap_view. This causes the not-calling ofdispatchwhich is in charge of checking theauth-methods.So I just put the
auth-checks manually in evey of my functions (like this):Hope this helps other desperate tastypie-developers 🙂