with the name of the module callback is in and the view_name, respectively, use it as the argument for the ValueError exception raise. if response has an attribute named 'render' and response.render is a callable function,
if hasattr ( response , 'render' ) and callable ( response . render ) :