18F/peacecorps-site — pull request #120 by cmc333333 (2014-12-05 23:28:38+00:00)
Title: Vignettes

To move text/images out of the template, this creates a model called "Vignette", which is a unique piece of content with a Sir Trevor field. This will allow the content editors to modify the text, order, and elements present where they would otherwise have static content.

This branch also adds a "Button" block type for Sir Trevor, showing some of the potential benefits of that editor. Button blocks are styled exactly as we want them, and they're smart enough to try to float above immediately prior photos.

All in all, this is a tech demo, to see if this is a strategy we want to follow for donations and elsewhere on the site.

* Moved all admin info into the `contenteditor` app
* Added templates, classes, and scripts for the "Button" block
* Overrode the "heading" block template to fix an escaped ampersand
* Adds a fixture for some initial content for the two vignettes on the landing page. These reference s3 images, and will need to be replaced when @annalee's work on images is complete
* Vignette model, with a function to fetch a specific instance. If that instance isn't in the db, a warning is provided
* Moved `contenteditor` above `sirtrevor` so that it will override the "heading" template (and others if we choose)
* Added some demo styles. I'm not at all attached to these, just wanted to see things look not-awful
* Similarly, there's functionality in the Button block that keeps track of if the button should float above an image. This is just a tech demo; we shouldn't keep it for long
* PEP8