mirror of
https://github.com/not-kennethreitz/convore.json.git
synced 2026-06-21 07:31:00 +00:00
1 line
2.2 KiB
JSON
1 line
2.2 KiB
JSON
[{"user_id": 37939, "stars": [], "topic_id": 42929, "date_created": 1311920856.643465, "message": "I know this would be considered a sin even for just thinking about it but I'll ask anyway. One thing that I like about django is how things are explicitly defined rather than having some functions that you didn't know where it came from until you consult the documentation. But the more I used it, I start feeling it would be nice if I can, for example automatically import things such as render_to_response, json, automatically into my views. Maybe something like pylons IIRC where you can defined in specific files what you want to automatically available in the controller.", "group_id": 81, "id": 1745597}, {"user_id": 3580, "stars": [], "topic_id": 42929, "date_created": 1311955832.9349561, "message": "yeah, a number of other frameworks embrace the idea of 'magic' variables like that.. Django certainly doesn't :) My biggest reason for not doing it would be that it would confuse/break pyflakes.. but if you reaaaaally wanted to I suppose you could import those modules in an empty module and then import * from it in your views.", "group_id": 81, "id": 1748867}, {"user_id": 37939, "stars": [], "topic_id": 42929, "date_created": 1311973523.0722461, "message": "thanks ! Nice idea. I'm thinking too far that it must be done automatically. Having to do it once - from views_global import * - in every views seem like a good compromise between typing everything vs having it magically available. It still 'explicit' and easy to understand. The pyflakes thing maybe a concern but even now I haven't found any static code analyzer that I like that I used it extensively.", "group_id": 81, "id": 1750957}, {"user_id": 1398, "stars": [], "topic_id": 42929, "date_created": 1312046508.7130699, "message": "If you use globals now it will hurt you later. Other people working your projects will hate you.", "group_id": 81, "id": 1755157}, {"user_id": 1736, "stars": [{"date_created": 1312155059.646976, "user_id": 5778}], "topic_id": 42929, "date_created": 1312054089.45734, "message": "Make a controller class/CBV of some kind that implements the fancy behavior you want and then import and subclass it elsewhere", "group_id": 81, "id": 1755571}] |