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

1 line
2.7 KiB
JSON

[{"user_id": 4077, "stars": [], "topic_id": 15032, "date_created": 1300996513.5499661, "message": "Sounds like a good time for a templatetag?", "group_id": 81, "id": 430382}, {"user_id": 22985, "stars": [], "topic_id": 15032, "date_created": 1300996210.4261761, "message": "I'm curious of a clean way to solve the following problem:\r\n- Populating navigation in base template based on a list of products\r\n- All view functions must pass this to the template they render\r\n\r\nIs there a cleaner, more django-ish way to solve this problem than making a wrapper view function that everyone calls to tack this on before rendering the template?", "group_id": 81, "id": 430337}, {"user_id": 22985, "stars": [], "topic_id": 15032, "date_created": 1300996261.3911431, "message": "I guess another way is to request this via ajax on the page load then the ajax code can be only in the base template. However, this seems like a bit of a hack.", "group_id": 81, "id": 430346}, {"user_id": 1102, "stars": [], "topic_id": 15032, "date_created": 1300999536.727334, "message": "(if I understand what you're after correctly)", "group_id": 81, "id": 430938}, {"user_id": 1102, "stars": [], "topic_id": 15032, "date_created": 1300999525.7358451, "message": "Also consider ContextProcessors http://docs.djangoproject.com/en/1.3/ref/templates/api/#writing-your-own-context-processors", "group_id": 81, "id": 430934}, {"user_id": 22985, "stars": [], "topic_id": 15032, "date_created": 1300999821.574513, "message": "@rob_ballou Thanks I'll look into the context processors.", "group_id": 81, "id": 430992}, {"user_id": 22985, "stars": [], "topic_id": 15032, "date_created": 1300999884.740386, "message": "@bmelton I guess I could just do the query in the tag code? Not a bad idea either.", "group_id": 81, "id": 431005}, {"user_id": 1126, "stars": [{"date_created": 1301024163.4107461, "user_id": 209}], "topic_id": 15032, "date_created": 1301005099.5355599, "message": "@durden20 requestcontext is pretty useful regardless, so you might want to look into using it everywhere at some point", "group_id": 81, "id": 431824}, {"user_id": 22985, "stars": [], "topic_id": 15032, "date_created": 1301004540.6456571, "message": "Template tag worked really well. I went against context processors because I'm using render_to_response and didn't want to modify all views to use requestcontext instead of context. Thanks!", "group_id": 81, "id": 431666}, {"user_id": 22985, "stars": [], "topic_id": 15032, "date_created": 1301021488.0844769, "message": "@pewpewarrows I'll definitely look at in the future.", "group_id": 81, "id": 434443}, {"user_id": 3354, "stars": [], "topic_id": 15032, "date_created": 1301021389.28707, "message": "requestcontext rules!", "group_id": 81, "id": 434421}]