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 this.
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 away_te
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 (abst
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 = mod
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 = models.CharFie
5 matches
Mail list logo