Hi, I would like to make a website about baseball player from an specific country, but I'm stock how to make the model for the player stat.
My Current a sample model is like this (The Stat Class is going to be much longer): class PLayer_Bios(models.Model): my_id = models.SlugField(unique=True) mlb_id = models.CharField(max_length=50) name = models.CharField(max_length=50) last = models.CharField(max_length=50) middle = models.CharField(max_length=50, blank=True) jersey = models.CharField(max_length=5) weight = models.CharField(max_length=10) height = models.CharField(max_length=10) bod = models.CharField(max_length=50) birth_city = models.CharField(max_length=50) birth_country = models.CharField(max_length=50) pro_debut_date = models.CharField(max_length=50) primary_position = models.CharField(max_length=50) team_name = models.CharField(max_length=50) throws = models.CharField(max_length=50) bats = models.CharField(max_length=50) def __unicode__(self): return self.name class Stat (models.Model): player_id = models.ForeignKey('PLayer_Bios') stat_id = models.CharField(max_length=50, unique=True) year = models.IntegerField(max_length=50) h = models.IntegerField(max_length=50) 2h = models.IntegerField(max_length=50) def __unicode__(self): return self.stat_id Here is how I want the template to look like: Each PLayer have this stat and if you see the year, the stat can have repeat year in two different row if the player was move to another team. Thanks in advance BATTING Regular Season Career StatsYEARâ–˛TEAMLGLEVELGABRHTB2B3BHRRBIBBIBBSOSB CSAVGOBPSLGOPSGO/AO1992[+] Minors582102344661004292605223.210.311.314.626- 1993GBOSALA (Full)12851585152203141157158195189.295.376.394.770-1994[+] Minors138540103186250271156858361508.344.410.463.873-1995COLINTAAA12348696 154205279245611562012.317.394.422.816-1995NYY<http://mlb.mlb.com/stats/sortable.jsp?c_id=nyy#playerType=ALL&season=1995&statType=hitting> ALMLB1548512184107301100.250.294.375.669-1996NYY<http://mlb.mlb.com/stats/sortable.jsp?c_id=nyy#playerType=ALL&season=1996&statType=hitting> ALMLB1575821041832502561078481102147.314.370.430.800- -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/KPhUBrn5WCEJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.