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

1 line
4.6 KiB
JSON

[{"user_id": 1, "stars": [], "topic_id": 17342, "date_created": 1301985695.58255, "message": "Oh wait, so the entire template is just {{ x }}? That's not just one part of it?", "group_id": 292, "id": 536729}, {"user_id": 1736, "stars": [], "topic_id": 17342, "date_created": 1301985734.0510781, "message": "It is also possible the author is a moron, without more info it is hard to say", "group_id": 292, "id": 536738}, {"user_id": 6627, "stars": [], "topic_id": 17342, "date_created": 1301985599.657896, "message": "Is there any point to a Django template which consists of {{ x }}, ie, just basically echoing x? Just came across this and was wondering if I was missing something. Any reason not to send x directly?", "group_id": 292, "id": 536698}, {"user_id": 1736, "stars": [], "topic_id": 17342, "date_created": 1301985585.461587, "message": "As opposed to?", "group_id": 292, "id": 536692}, {"user_id": 1, "stars": [], "topic_id": 17342, "date_created": 1301985628.036516, "message": "Depends what x is", "group_id": 292, "id": 536706}, {"user_id": 1736, "stars": [{"date_created": 1302017762.1359241, "user_id": 141}], "topic_id": 17342, "date_created": 1301985655.2682741, "message": "Giving the author the benefit of the doubt, it might be the default template in a place when the user of the app is expected to override it with something better", "group_id": 292, "id": 536718}, {"user_id": 6627, "stars": [], "topic_id": 17342, "date_created": 1301985698.4594049, "message": "Ah, thanks! I think in this case it's just an HTML string, but I'll dig into it further with these things in mind.", "group_id": 292, "id": 536731}, {"user_id": 6627, "stars": [{"date_created": 1301985937.104233, "user_id": 1}], "topic_id": 17342, "date_created": 1301985817.2468309, "message": "I guess it is probably a place holder as suggested if there is no other clear reason for it", "group_id": 292, "id": 536762}, {"user_id": 1, "stars": [], "topic_id": 17342, "date_created": 1301985652.6459751, "message": "If x is a model instance whose __unicode__ or __str__ method does something nontrivial, then it could make sense.", "group_id": 292, "id": 536716}, {"user_id": 6627, "stars": [], "topic_id": 17342, "date_created": 1301985736.982929, "message": "yeah, the entire template is {{ x }}, and the output from rendering that is sent out directly", "group_id": 292, "id": 536739}, {"user_id": 6627, "stars": [], "topic_id": 17342, "date_created": 1301985764.6602359, "message": "definitely not a moron", "group_id": 292, "id": 536745}, {"user_id": 6627, "stars": [{"date_created": 1302142686.9073019, "user_id": 205}], "topic_id": 17342, "date_created": 1301985956.6562481, "message": "thanks for the quick responses! This is great", "group_id": 292, "id": 536802}, {"user_id": 4383, "stars": [], "topic_id": 17342, "date_created": 1301987203.905277, "message": "I'm guessing it's django-notifications from pinax", "group_id": 292, "id": 537192}, {"user_id": 4383, "stars": [{"date_created": 1302003037.0368421, "user_id": 11592}], "topic_id": 17342, "date_created": 1301987215.433939, "message": "It's there so you can override it with your own template.", "group_id": 292, "id": 537195}, {"user_id": 1677, "stars": [], "topic_id": 17342, "date_created": 1302154431.2563651, "message": "Seconding the suggestion that it's there so you might override it in your own template.", "group_id": 292, "id": 572070}, {"user_id": 4077, "stars": [], "topic_id": 17342, "date_created": 1302186182.96473, "message": "Sending 'x' to be rendered MIGHT be SLIGHTLY faster, but then you also lose the ability to cache the templates, I'd think, which is a big hit. You could potentially rig up your own solution using your own cache store, but I can't see a situation in which this way is faster.", "group_id": 292, "id": 575510}, {"user_id": 4077, "stars": [], "topic_id": 17342, "date_created": 1302186082.7211771, "message": "The real reason you wouldn't want to build your page in the view, and then just pass 'x' out to render is that it's harder to maintain. That's kind of the point behind MVC (or MVC-like) frameworks, to abstract away components that make sense. It's easier to edit a 'plain HTML' template that accepts tags than it is to build the entirety of the output in a view -- plus, the latter method is FAR less reusable.", "group_id": 292, "id": 575485}, {"user_id": 4077, "stars": [], "topic_id": 17342, "date_created": 1302186124.1258211, "message": "One of the main benefits to this is that you can hire a designer to build the HTML template, and all they have to know is HTML, to get the job done. They don't need to know anything about Django, or Python to implement it.", "group_id": 292, "id": 575494}]