def session_view(request):
 request.session['tobacconist'] = 'hovercraft'
 t = Template('This is a view that modifies the session.', name='Session Modifying View Template')
 c = Context()
 return HttpResponse(t.render(c))

def session_view ( request ) : request . session [ 'tobacconist' ] = 'hovercraft' t = Template ( 'This is a view that modifies the session.' , name = 'Session Modifying View Template' ) c = Context ( ) return HttpResponse ( t . render ( c ) )
a view that modifies the session .