开发者

Serve external template in Django

I want to do something like

return render_to_response("http://docs.google.com/View?id=bla", args)

and serve an external page with django arguments. Django doesn't like this (it looks for templates in very particular places).

What's the easiest way make this work? Right now I'm thinking to use urllib to save the page to somewhere locally on my server and then serve with the templates pointing to there.

Note: I'm not looking for anything particularly s开发者_开发百科calable here, I realize my proposal above is a little dirty.


Read the template in as a string and render it yourself.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜