Let's say I'm getting some JSON in the format of...

"fellowPlayers": [
            {
               "championId": 110,
               "teamId": 100,
               "summonerId": 34258805
            },
            {
               "championId": 9,
               "teamId": 100,
               "summonerId": 19923759
            },
            {
               "championId": 46,
               "teamId": 200,
               "summonerId": 2112359
            },
            ...]

...that can have a variable # of entries (from 0-11, inclusive), but each 
entry has those 3 attributes, 2 of which should map to other tables 
(championId and summonerId).

*How would I want to define a table/model in Django to store the list of 
fellowPlayers (of unknown length)?*

If any more information is needed please comment.

If this can't be directly done, how would you suggest handling such a 
situation? My initial thought was to hardcore in a # of fields 
(fellow_player_1, fellow_player_2, etc) based on what I expect the maximum 
# of entries to be, but that approach seems like it could be improved on a 
lot, although 11 isn't too bad in terms of hardcoding.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1a3aea81-ca1b-43be-be77-21c262095038%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to