added changes to support 1.5 deprecation of FBV direct_to_template