Porting ------- Existing function based views often have an initial part building a set of values from the view parameters that then is passed on as a context to the template rendering. When refactoring this to the more iommi idiomatic style of calculating values in callbacks, it can sometimes be helpful to not have to move everything at once. Let's look at an example to make this more concrete: .. code-block:: python def some_function(a, b): return a + b def legacy_view(request, a, b): context = dict(a=a, b=b, c=some_function(a, b)) return HttpResponse(Template('{{a}} + {{b}} = {{c}}').render(RequestContext(request, context))) .. raw:: html