Unlike all our other API endpoints, we don't want to use JSON, but instead just present an HTML representation. There are two styles of HTML renderer provided by REST framework, one for dealing with HTML rendered using templates, the other for dealing with pre-rendered HTML. The second renderer is the one we'd like to use for this endpoint.

    Instead of using a concrete generic view, we'll use the base class for representing instances, and create our own method. In your add:

    And then add a url pattern for the snippet highlights: