{"issue":{"created_at":"2011-12-07T20:07:19Z","state":"closed","updated_at":"2011-12-08T00:39:47Z","user":{"gravatar_id":"23f389411056ead7bc39c8e71fa26c5a","id":138016,"url":"https://api.github.com/users/wickedgrey","login":"wickedgrey","avatar_url":"https://secure.gravatar.com/avatar/23f389411056ead7bc39c8e71fa26c5a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":2,"body":"I have a directory structure set up like this:\r\n\r\n```\r\nwebapp/templates/boilerplate/header.xml\r\nwebapp/\r\n   myblueprint/\r\n       templates/\r\n           foo.xml\r\n       controller.py\r\n```\r\n\r\nInside of foo.xml I'm trying to:\r\n\r\n```\r\n   <xi:include href=\"boilerplate/header.xml\"></xi:include>\r\n```\r\n\r\nBut I keep getting this error, no matter how I spell it:\r\n\r\n```\r\n File \"build/bdist.macosx-10.6-intel/egg/genshi/template/loader.py\",\r\nline 246, in load\r\n   raise TemplateNotFound(filename, search_path)\r\nTemplateNotFound: Template \"/boilerplate/header.xml\" not found\r\n```\r\n\r\nAt the top of the controller in question, I have the following code:\r\n\r\n```\r\n   for x in app.genshi_instance.template_loader.search_path:\r\n       try:\r\n           print x\r\n           print x('boilerplate/header.xml')\r\n       except Exception, e:\r\n           print e\r\n           pass\r\n```\r\n\r\nWhich produces:\r\n\r\n```\r\n<function _load_from_directory at 0x104b492a8>\r\n('/.../webapp/templates/boilerplate/header.xml',\r\n'boilerplate/header.xml', <open file\r\n'/.../webapp/templates/boilerplate/header.xml', mode 'U' at\r\n0x104b27a50>, <function _uptodate at 0x104b49488>)\r\n<function _dispatch_by_prefix at 0x104b49410>\r\nTemplate \"boilerplate/header.xml\" not found\r\n```\r\n\r\nSimilarly, if I try to access 'otherblueprint/something.xml' from the controller, the _dispatch_by_prefix finds it, but generates a TemplateNotFound error inside of the template.\r\n\r\nAny idea why?","assignee":null,"number":14,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"id":2479333,"labels":[],"title":"xi:include doesn't seem to use the same loader as render_response","html_url":"https://github.com/dag/flask-genshi/issues/14","closed_at":"2011-12-08T00:39:47Z","url":"https://api.github.com/repos/dag/flask-genshi/issues/14","milestone":null},"action":"closed"}