taskapp/models.py
changeset 12 a93eebabfeb1
parent 10 bf0cbea1bd12
child 18 a39549bd5b08
equal deleted inserted replaced
11:7c9fea7e28c8 12:a93eebabfeb1
    22 UPLOADS_DIR = "./uploads"
    22 UPLOADS_DIR = "./uploads"
    23 
    23 
    24 class Profile(models.Model):
    24 class Profile(models.Model):
    25 	
    25 	
    26     user = models.ForeignKey(User, unique = True)
    26     user = models.ForeignKey(User, unique = True)
    27     aboutme = models.TextField()
    27     dob = models.DateField(help_text = "YYYY-MM-DD")
    28     dob = models.DateField()
       
    29     gender = models.CharField(max_length = 1, choices = GENDER_CHOICES)
    28     gender = models.CharField(max_length = 1, choices = GENDER_CHOICES)
    30     rights = models.CharField(max_length = 2, choices = RIGHTS_CHOICES)
    29     rights = models.CharField(max_length = 2, choices = RIGHTS_CHOICES, default = u"CT")
    31     credits = models.PositiveSmallIntegerField()
    30     credits = models.PositiveSmallIntegerField(default = 0)
    32     
    31     
       
    32     aboutme = models.TextField(blank = True)
    33     foss_comm = models.CharField(max_length = 80, blank = True)
    33     foss_comm = models.CharField(max_length = 80, blank = True)
    34     phonenum = models.CharField(max_length = 15, blank = True)
    34     phonenum = models.CharField(max_length = 15, blank = True)
    35     homepage = models.URLField(blank = True)
    35     homepage = models.URLField(blank = True)
    36     street = models.CharField(max_length = 80, blank = True)
    36     street = models.CharField(max_length = 80, blank = True)
    37     city = models.CharField(max_length = 25, blank = True)
    37     city = models.CharField(max_length = 25, blank = True)
    61     claimed_users = models.ManyToManyField(User, blank = True, related_name = "%(class)s_claimed_users")
    61     claimed_users = models.ManyToManyField(User, blank = True, related_name = "%(class)s_claimed_users")
    62     assigned_users = models.ManyToManyField(User, blank = True, related_name = "%(class)s_assigned_users")
    62     assigned_users = models.ManyToManyField(User, blank = True, related_name = "%(class)s_assigned_users")
    63     
    63     
    64     creation_datetime = models.DateTimeField()
    64     creation_datetime = models.DateTimeField()
    65     
    65     
       
    66     #is_claimable = models.BooleanField()
       
    67     
    66     ## not yet decided if attribs after this are to be included
    68     ## not yet decided if attribs after this are to be included
    67     ## tasktype = "" ## "bugfix"/"enhancement"
    69     ## tasktype = "" ## "bugfix"/"enhancement"
    68     ## priority = "" ## "very urgent"/"urgent"
    70     ## priority = "" ## "very urgent"/"urgent"
    69     
    71     
    70     def __unicode__(self):
    72     def __unicode__(self):