Re: Models for a hockey database

2009-10-08 Thread Christian Wittwer
Hi, > I have a pretty large site that tracks a football team and it's league > ( http://www.muskegohitmen.com ). That sounds interesting.. ;-) > Things you'll probably want to consider > Seasons - a very small model class, but organizing things by a season > becomes pretty tricky with out

Re: Models for a hockey database

2009-10-08 Thread Christian Wittwer
Hi, > class Team(models.Model): >    name = models.CharField(max_length=60) > > class Player(models.Model): >    surname = models.CharField(max_length=60) >    lastname = models.CharField(max_length=60) >    team = models.ForeignKey(Team) > > Now you can just specify the home_team and the

Re: Models for a hockey database

2009-10-08 Thread esatterwh...@wi.rr.com
I have a pretty large site that tracks a football team and it's league ( http://www.muskegohitmen.com ). What I did was to have an abstract base statistics class that is attached to a player/user. then mad a class for every stat i wanted to track class Statistics(models.Model): #base class

Re: Models for a hockey database

2009-10-07 Thread Curt
Instead of including every player in the Game model, I would add a field to the Player model to assign which team a player belongs to: class Team(models.Model): name = models.CharField(max_length=60) class Player(models.Model): surname = models.CharField(max_length=60) lastname =

Models for a hockey database

2009-10-05 Thread c!w
Hi, I trying to create a hockey database, based on Django. The heaviest part so long is to define the structure of my models. There I need some help. What I have so far.. class Team(models.Model): name = models.CharField(max_length=60) class Player(models.Model): surname =