Created
March 9, 2012 20:01
-
-
Save debuggerpk/2008359 to your computer and use it in GitHub Desktop.
for fahdie
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class InningsCard(models.Model): | |
fixture = models.ForeignKey(Fixture) | |
team = models.ForeignKey(Team) | |
runs = models.IntegerField(max_length=6, default=0) | |
wickets = models.IntegerField(max_length=6, default=0) | |
overs = models.FloatField(max_length=6, default=0.0) | |
def __unicode__(self): | |
return str(self.team) | |
class BattingDetail(models.Model): | |
STATUS_CHOICES = ( | |
('no', 'not out'), | |
('bowled', 'bowled'), | |
('caught', 'caught'), | |
('lbw', 'lbw'), | |
) | |
innings = models.ForeignKey(InningsCard) | |
player = models.ForeignKey(Player) | |
runs = models.IntegerField(max_length=5, default=0) | |
status = models.CharField(max_length=15, choices=STATUS_CHOICES, default='no') | |
def __unicode__(self): | |
return str(self.player) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment