Support including raw text fields in the API when using force-text-type.

Review Request #6436 — Created Oct. 14, 2014 and submitted — Latest diff uploaded

Information

Review Board
release-2.0.x
1ce708b...

Reviewers

The force-text-type= parameter in requests is useful for returning text
in a different format, but there are times when the client would need
the raw text along with this.

Now, the client can also send an include-raw-text-fields=1 parameter,
which will embed a raw_text_fields dictionary in the object's payload
containing an entry for each text field. Each entry provides the raw
version of the text. This is optional, in order to prevent the default
response from ballooning in size.

On an implementation level, this is done by removing all the custom
serializers, and instead adding some metadata to the resource's fields
list for each field that supports text types. MarkdownFieldsMixin's
serialize_object then handles embedding these raw fields in the payload
on request.

Tested manually wit and without the new parameter.

Unit tests pass.