To simply disable the browsable API in all cases you'd remove BrowsableAPIRenderer from the renderer_classes attribute on the view, or the DEFAULT_RENDERER_CLASSES settings key.
That won't work in your case as you'd like it to be conditional on the type of user.
Instead you'll want to override the `
get_renderers()` method on the view, to conditionally include BrowsableAPIRenderer or not.
Something along these lines:
def get_renderers(self):
if self.request.user.is_staff:
renderer_classes = [JSONRenderer, BrowsableAPIRenderer]
else:
renderer_classes = [JSONRenderer]
return [renderer_class() for renderer_class in renderer_classes]
If you put that behaviour in a mixin class you can easily include it in all your views.
Hope that helps.
Tom