Django-tastypie. Output in JSON to the browser by default
问题 I see 'Sorry, not implemented yet. Please append "?format=json" to your URL.'. I need always append string "?format=json". Can I make a output in JSON by default? Regards, Vitaliy 回答1: From the tastypie cookbook, in order to change the default format, you need to override the determine_format() method on your ModelResource: class MyResource(ModelResource): .... def determine_format(self, request): return 'application/json' The above link demonstrates alternative methods of determining output