Siobhan Tully | 4bc09f2 | 2013-04-10 21:15:21 -0400 | [diff] [blame] | 1 | import os |
| 2 | import datetime |
| 3 | from django.db import models |
| 4 | from plstackapi.core.models import PlCoreBase |
| 5 | from plstackapi.core.models import Site |
| 6 | |
| 7 | # Create your models here. |
| 8 | |
| 9 | class User(PlCoreBase): |
| 10 | user_id = models.CharField(max_length=256, unique=True) |
| 11 | firstname = models.CharField(help_text="person's given name", max_length=200) |
| 12 | lastname = models.CharField(help_text="person's surname", max_length=200) |
| 13 | email = models.EmailField(help_text="e-mail address") |
| 14 | phone = models.CharField(null=True, blank=True, help_text="phone number contact", max_length=100) |
| 15 | user_url = models.URLField(null=True, blank=True) |
| 16 | is_admin = models.BooleanField(default=False) |
| 17 | enabled = models.BooleanField(default=True, help_text="Status for this User") |
| 18 | site = models.ForeignKey(Site, related_name='users', verbose_name="Site this user will be homed too") |
| 19 | |
| 20 | def __unicode__(self): return u'%s' % (self.email) |