Skip to content

Instantly share code, notes, and snippets.

@kyleconroy
Created January 4, 2012 05:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyleconroy/1558651 to your computer and use it in GitHub Desktop.
Save kyleconroy/1558651 to your computer and use it in GitHub Desktop.
class FootballWeek (models.Model):
season = models.IntegerField(default=2012, editable=False)
week = models.IntegerField()
startdate = models.DateTimeField()
enddate = models.DateTimeField()
winning_team_points = models.PositiveIntegerField(default=0)
winning_team_bonus = models.PositiveIntegerField(default=0)
>>> f = FootballWeek.objects.all()[0]
>>> f
<FootballWeek: Week 1>
>>> f.startdate
u'2012-01-03 20:43:33'
>>> f.enddate
u'2012-01-13 20:43:34'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment