I have a very simple resource similar to this for my 'Presentacion' model
class PresentacionResource(ModelResource): model = Presentacion fields = (some fields) ignore_fields = (few to ignore)
and I need to implement authentication for this, since I read, I created two wrappers
class AuthListOrCreateModelView(ListOrCreateModelView): permissions = (IsAuthenticated, ) class AuthInstanceModelView(InstanceModelView): permissions = (IsAuthenticated, )
And then in mine in my urls.py
url(r'^presentaciones/$', AuthListOrCreateModelView.as_view(resource=PresentacionResource), name='presentacion-root'), url(r'^presentaciones/(?P<id>[0-9]+)$', AuthInstanceModelView.as_view(resource=PresentacionResource), name='presentacion'),
This works fine for 'presentaciones /' GET requests, but when I try to make a PUT request, I get 403 FORBIDDEN
What is strange to me is that GET works fine: as long as I am registered, it answers correctly, but if I log out, it answers 403 FORBIDDEN.
nachoab
source share