Private
Public Access
1
0

changed Team model

This commit is contained in:
Sander Roosendaal
2017-02-07 17:54:47 +01:00
parent abcf2f1789
commit 97e6ad5d27
2 changed files with 14 additions and 2 deletions

View File

@@ -85,6 +85,10 @@ class PowerZonesField(models.TextField):
class Team(models.Model):
name = models.CharField(max_length=150)
notes = models.CharField(blank=True,max_length=200)
manager = models.ForeignKey(User)
def __unicode__(self):
return self.name
# Extension of User with rowing specific data
class Rower(models.Model):
@@ -149,7 +153,7 @@ class Rower(models.Model):
# Friends/Team
friends = models.ManyToManyField("self",blank=True)
team = models.ForeignKey(Team,blank=True,null=True)
team = models.ManyToManyField(Team,blank=True)
def __str__(self):
return self.user.username