Allow subclasses of RootResource to provide additional data.

Review Request #5287 — Created Jan. 21, 2014 and submitted — Latest diff uploaded

Information

Djblets
master

Reviewers

Allow subclasses of RootResource to provide additional data.

RootResource no longer hard-codes the structure of the resource data.
Subclasses can now override serialize_root() to provide additional data.

In order to allow caching to work correctly with custom data, we now use
a repr() of the data instead of assuming certain contents when
generating the SHA1 for the ETag.

Used this in Review Board to add some new data. Verified the original and
additional data was included.

Downloaded the resource and headers and saw the ETag. Ran with
curl -H 'If-None-Match: <etag> and saw that it returned a Not Modified.

Changed the payload and saw the ETag change.

    Loading...