class EntryResource(ModelResource):
user = fields.ForeignKey(UserResource, 'user')
class Meta:
queryset = Entry.objects.all()
list_allowed_methods = ['get','post']
detail_allowed_methods = ['post']
resource_name = 'myapp/entry'
Why there is need to add "POST" in detail_allowed_methods, As I comment detail_allowed_methods "POST" work fine..!
It works fine because on commenting out
detail_allowed_methods
, Tastypie falls back to it's default value, which is:So, commenting
detail_allowed_methods
won't do anything. If you want to disable all methods, set it's value to an empty list:See Tastypie docs.