root / accounts / models.py @ 4daaf632
History | View | Annotate | Download (523 Bytes)
1 |
from django.db import models |
---|---|
2 |
from django.contrib.auth.models import User |
3 |
from edumanage.models import * |
4 |
|
5 |
|
6 |
class UserProfile(models.Model): |
7 |
user = models.OneToOneField(User) |
8 |
institution = models.ForeignKey(Institution) |
9 |
is_social_active = models.BooleanField(default=False)
|
10 |
|
11 |
class Meta: |
12 |
permissions = ( |
13 |
("overview", "Can see registered user and respective institutions"), |
14 |
) |
15 |
|
16 |
def __unicode__(self): |
17 |
return "%s:%s" %(self.user.username, self.institution) |
18 |
|