defunkt/pystache — Issue #49: View class should not "own" the context
Author: cjerdonek
Created: 2011-12-13 04:13:07+00:00
State: open

It seems like View instances should not "own" the rendering context (as [they currently do via `View.context_list`](https://github.com/defunkt/pystache/blob/22fbaa2b0d1bd225a5319679febcb4304c193ab1/pystache/view.py#L62)).

The context is part of the state used during the rendering process, and so would be more appropriately owned and managed by whatever is doing the rendering. (Currently Template instances manage the rendering, for example [in the `Template._render_dictionary()` method](https://github.com/defunkt/pystache/blob/22fbaa2b0d1bd225a5319679febcb4304c193ab1/pystache/template.py#L148) by pushing and popping the context stack.)

Addressing this issue will help simplify the View class and better define separations of concern.