Whitespace cleanups introduced in 2638112d
Reorganize views to avoid untestable functions

Standard django view practice recommends decorators and
'render_to_response' similar to:

@etag(hasher)
@json_api
def create_some_object(request):
   ....
   return render_to_response('template', {...}, RequestContext(...))

This, however, makes it very hard to test view methods in safe and
reliable way. This commit adjusts the standard paradigm to separate the
view from the code that generates the backing data.

The general transformation is to apply decorators directly and rename
the view (continuing example from above):

create_some_object_view = etag(hasher)(json_api(create_some_object))

This solves the problem of decoupling decorators but doesn't really help
with the main template problem. To do that a new 'decorator' has been
added that allows developers to wrap a function and automatically render
a template:

plot_detail_view = instance_request(etag(_plot_hash)(
    render_template('treemap/plot_detail.html', plot_detail)))

The `plot_detail` function now only needs to return `{'plot': the_plot}`
Merge pull request #62 from ahinz/topic/reorg-views

Reorganize views to avoid untestable functions