mozilla/fxoss — pull request #123 by Osmose (2014-06-02 21:38:37+00:00)
Title: Bug 1019227: Embed CTA as PDF

Adds a new model to represent the CTA (agreement). The agreement document is stored as a PDF in a FileField on the Agreement model, and it is displayed to users using PDF.js.

The existing Agreement model has been renamed to SignedAgreement, and instead of storing a string for the version the user signed, it stores a ForeignKey to the agreement they signed. Existing agreements will have a null value, which we can manually set to the first agreement once the change is pushed and the first agreement is added.

The page for signing the agreement has been converted to a normal Django view as well, so we don't have to rely on the download agreement page being in the content tree anymore.

In order to update/change the agreement, admins will create a new agreement object, assign it a version string, and update the `DOWNLOAD_AGREEMENT_VERSION` setting to match the string of the new version.

I realize now I still need to update the documentation for changing the agreement, but for now a review on the code that's there would be useful.