Files
2012-02-21 01:15:00 -05:00

1 line
4.3 KiB
JSON

[{"user_id": 553, "stars": [], "topic_id": 10158, "date_created": 1299083819.813921, "message": "i pass it a name and data and it'll return dict of all blocks in template and their content", "group_id": 81, "id": 248475}, {"user_id": 553, "stars": [], "topic_id": 10158, "date_created": 1299083800.3291581, "message": "i need a function like render_to_dict for templates", "group_id": 81, "id": 248473}, {"user_id": 553, "stars": [], "topic_id": 10158, "date_created": 1299083888.821043, "message": "well probably i'll pass block names too", "group_id": 81, "id": 248481}, {"user_id": 553, "stars": [], "topic_id": 10158, "date_created": 1299083924.9447291, "message": "while i would imagine that rendering only a part should be even quicker :)", "group_id": 81, "id": 248489}, {"user_id": 553, "stars": [], "topic_id": 10158, "date_created": 1299084074.1415009, "message": "1st didn't work at all :)", "group_id": 81, "id": 248514}, {"user_id": 553, "stars": [], "topic_id": 10158, "date_created": 1299084069.286485, "message": "oops i meant this one http://djangosnippets.org/snippets/942/", "group_id": 81, "id": 248513}, {"user_id": 553, "stars": [], "topic_id": 10158, "date_created": 1299083897.0265851, "message": "so i've tried this implementation http://djangosnippets.org/snippets/769/", "group_id": 81, "id": 248482}, {"user_id": 553, "stars": [], "topic_id": 10158, "date_created": 1299083908.9914839, "message": "and for some reason it's extremely slow, 10x slower than render_to_string", "group_id": 81, "id": 248486}, {"user_id": 553, "stars": [], "topic_id": 10158, "date_created": 1299083935.92257, "message": "are there any other implementations?", "group_id": 81, "id": 248492}, {"user_id": 16762, "stars": [], "topic_id": 10158, "date_created": 1299093931.3642809, "message": "Well at first glance, that second snippet seems to be rendering the whole template for no reason (line 47)", "group_id": 81, "id": 252075}, {"user_id": 16762, "stars": [], "topic_id": 10158, "date_created": 1299093968.949261, "message": "I'd just make your own implementation. One thing to take note of are that you'll want to push the render_context, render the node, then pop it again", "group_id": 81, "id": 252086}, {"user_id": 553, "stars": [], "topic_id": 10158, "date_created": 1299097078.639261, "message": "so essentialy i take template, loop over extends.nodelist and pick the block that i want", "group_id": 81, "id": 252472}, {"user_id": 553, "stars": [], "topic_id": 10158, "date_created": 1299097082.2488379, "message": "then i .render() each of them?", "group_id": 81, "id": 252473}, {"user_id": 553, "stars": [], "topic_id": 10158, "date_created": 1299100273.433609, "message": "well i have base.html with 2 blocks, say, \"header\" and \"content\"", "group_id": 81, "id": 252917}, {"user_id": 553, "stars": [], "topic_id": 10158, "date_created": 1299100288.671535, "message": "now i have child template index.html with same blocks and content", "group_id": 81, "id": 252922}, {"user_id": 16762, "stars": [], "topic_id": 10158, "date_created": 1299100400.369684, "message": "ok", "group_id": 81, "id": 252979}, {"user_id": 16762, "stars": [], "topic_id": 10158, "date_created": 1299100455.5956371, "message": "so get the template (of index.html), look through it's nodelist to get the blocks, render them", "group_id": 81, "id": 253004}, {"user_id": 16762, "stars": [], "topic_id": 10158, "date_created": 1299100156.976269, "message": "Sure, if you want to render each one... i'm not really sure exactly what you're trying to do", "group_id": 81, "id": 252866}, {"user_id": 553, "stars": [], "topic_id": 10158, "date_created": 1299100320.0325379, "message": "dict", "group_id": 81, "id": 252940}, {"user_id": 553, "stars": [], "topic_id": 10158, "date_created": 1299100293.561933, "message": "so far generic django", "group_id": 81, "id": 252925}, {"user_id": 553, "stars": [], "topic_id": 10158, "date_created": 1299100313.5011549, "message": "now, i want to render index.html and get content for those 2 blocks only", "group_id": 81, "id": 252936}, {"user_id": 553, "stars": [], "topic_id": 10158, "date_created": 1299100318.8388121, "message": "in a dcit", "group_id": 81, "id": 252938}, {"user_id": 553, "stars": [], "topic_id": 10158, "date_created": 1299100921.7061369, "message": "thanks, sounds good", "group_id": 81, "id": 253178}]