equal
deleted
inserted
replaced
1 from django.db import models |
1 from django.db import models |
2 |
2 |
3 # Create your models here. |
3 from django.contrib.auth.models import User |
|
4 |
|
5 GENDER_CHOICES = (( 'M', 'Male'), ('F', 'Female')) |
|
6 |
|
7 RIGHTS_CHOICES = ( |
|
8 ("DC", "Director"), |
|
9 ("MG", "Manager"), |
|
10 ("CT", "Contributor"),) |
|
11 |
|
12 class Profile(models.Model): |
|
13 |
|
14 user = models.ForeignKey(User, unique = True) |
|
15 rights = models.CharField(max_length = 2, choices = RIGHTS_CHOICES, default = u"CT") |
|
16 pynts = models.PositiveSmallIntegerField(default = 0) |
|
17 |
|
18 aboutme = models.TextField(blank = True, help_text="This information will\ |
|
19 be used to judge the eligibility for any task") |
|
20 |
|
21 dob = models.DateField(verbose_name = u"Date of Birth", help_text = "YYYY-MM-DD") |
|
22 gender = models.CharField(max_length = 1, choices = GENDER_CHOICES) |
|
23 |
|
24 address = models.TextField(blank = False, help_text="This information will\ |
|
25 be used to send any DDs/Cheques") |
|
26 phonenum = models.CharField(max_length = 15, blank = True, verbose_name = u"Phone Number") |
|
27 |
|
28 def __unicode__(self): |
|
29 return unicode(self.user.username) |