blob: 765fb62afa8b8c11d7ff2c9fcdeb9aef3949696f [file] [log] [blame]
Siobhan Tully4bc09f22013-04-10 21:15:21 -04001import os
2import datetime
3from django.db import models
4from plstackapi.core.models import PlCoreBase
5from plstackapi.core.models import Site
6
7# Create your models here.
8
9class 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)