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

1 line
2.8 KiB
JSON

[{"user_id": 3580, "stars": [], "topic_id": 35885, "date_created": 1305756013.4474969, "message": "Is that nuts? is there already some clever way of doing that?", "group_id": 81, "id": 1103732}, {"user_id": 281, "stars": [{"date_created": 1305799203.5615389, "user_id": 6648}], "topic_id": 35885, "date_created": 1305756392.7533851, "message": "Model utils offers a nice little helper class for making choices a lot cleaner to work with https://github.com/carljm/django-model-utils", "group_id": 81, "id": 1103766}, {"user_id": 1147, "stars": [], "topic_id": 35885, "date_created": 1305756894.447186, "message": "And it's a drop-in replacement because it also accepts the tuple of tuple choices you might already have created. In addition to supporting the new syntax which is easier to read for some people.", "group_id": 81, "id": 1103855}, {"user_id": 3580, "stars": [], "topic_id": 35885, "date_created": 1305755972.5740991, "message": "I get bummed out using tuple-tuples for Choices... I hacked up this https://gist.github.com/979666", "group_id": 81, "id": 1103726}, {"user_id": 3580, "stars": [], "topic_id": 35885, "date_created": 1305755998.207432, "message": "I'd really prefer to reference them as structured constants.. so that class lets me do things like 'COLOR_CHOICES.Red'", "group_id": 81, "id": 1103731}, {"user_id": 32856, "stars": [{"date_created": 1305792166.4491079, "user_id": 17897}], "topic_id": 35885, "date_created": 1305756199.8524721, "message": "You might be interested in namedtuple. It's not quite what you're doing in that gist, but along a similar vein. http://docs.python.org/library/collections.html#collections.namedtuple", "group_id": 81, "id": 1103744}, {"user_id": 1147, "stars": [], "topic_id": 35885, "date_created": 1305756820.3941009, "message": "You can try django_choices.. http://dpaste.com/544069/ it's a drop-in replacement. Lets you use it as a dictionary or object. choices.something or choices['something'].. also has a few helper methods so you can find by value.", "group_id": 81, "id": 1103845}, {"user_id": 1147, "stars": [], "topic_id": 35885, "date_created": 1305757026.4037189, "message": "It wasn't always a class which is why it's not a CamelCase name btw.. feel free to upgrade :)", "group_id": 81, "id": 1103878}, {"user_id": 6648, "stars": [], "topic_id": 35885, "date_created": 1305799250.835233, "message": "+1 for django-model-utils I use Choices from that quite a bit.", "group_id": 81, "id": 1110065}, {"user_id": 21387, "stars": [], "topic_id": 35885, "date_created": 1305812865.370502, "message": "I wrote a little snippet that I use in all of my projects. I don't like to depend on other packages for such functionality, so I have it in a 'common' package in my projects. http://dpaste.com/hold/544222/ - The code has doctests. :)", "group_id": 81, "id": 1111275}]